Giter Site home page Giter Site logo

Comments (4)

bukosabino avatar bukosabino commented on August 22, 2024

Hi @saroun74 ,

The implementation of ROC (Rate Of Change) is different than your link, but it's right. The result is the same if you use:

close / close.shift(r1) - 1
or
(close - close.shift(r1)) / close.shift(r1)

So, I think we can change the implementation from:

    rocma1 = (close / close.shift(r1) - 1).rolling(n1).mean()
    rocma2 = (close / close.shift(r2) - 1).rolling(n2).mean()
    rocma3 = (close / close.shift(r3) - 1).rolling(n3).mean()
    rocma4 = (close / close.shift(r4) - 1).rolling(n4).mean()

to:

    rocma1 = ((close - close.shift(r1)) / close.shift(r1)).rolling(n1).mean()
    rocma2 = ((close - close.shift(r2)) / close.shift(r2)).rolling(n2).mean()
    rocma3 = ((close - close.shift(r3)) / close.shift(r3)).rolling(n3).mean()
    rocma4 = ((close - close.shift(r4)) / close.shift(r4)).rolling(n4).mean()

Perhaps the code is more clear in this way.

What do you think?

from ta.

saroun74 avatar saroun74 commented on August 22, 2024

I'm not mentioning the implementation of ROC.
This package returns the 'sig', but the sockcharts.com link guides 'kst - sig' as indicator.

from ta.

bukosabino avatar bukosabino commented on August 22, 2024

Ok, I understand your suggestion now.

So, I think we could get 3 indicators: KST, KST Signal, and KST - KST Signal.

test

What do you think?

from ta.

bukosabino avatar bukosabino commented on August 22, 2024

Library updated to new version 0.1.5.

Now, we get 3 indicators from KST: KST, KST Signal, and KST - KST Signal.

from ta.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.