Code Monkey home page Code Monkey logo

Comments (4)

hroff-1902 avatar hroff-1902 commented on May 16, 2024
  • fix parenthesis in this line:
dataframe['%K'] = 100 * ((dataframe['Close'] - dataframe['L14']) / dataframe['H14'] -dataframe['L14'] ) )
  • There is no 'Low' column in the dataframe: fix dataframe['Low']
  • There is no 'Close' column in the dataframe: fix dataframe['Close']
  • Fix parenthesis here:
            (
            dataframe['%K'] == dataframe['%D'] &
            dataframe['%D'] > 30

            ),

and here

            (
            dataframe['%K'] == dataframe['%D'] &
            dataframe['%D'] < 50

            ),

-- the & operator has higher precedence in python than == and >.

from freqtrade-strategies.

hroff-1902 avatar hroff-1902 commented on May 16, 2024
  • Ta-lib contains implementation of Stochastic Oscillator which is ready to use, there is no need to calculate it in the strategy: http://www.tadoc.org/indicator/STOCH.htm
  • Your implementation of '%K' seems to be wrong, I do not see the use of 'HighestHigh' and 'LowestLow' as the Stochastic Oscillator definition assumes (see the link above).
  • dataframe['H14'] = dataframe["high"].rolling(window=14) seems to be wrong, you need to call a function on the rolling window, like .max() for taking the highest value. The rolling window should be taken over the 'close' column, not on 'high'

from freqtrade-strategies.

7baughj avatar 7baughj commented on May 16, 2024

Hi,
Thank you for your commits,

I need to do a lot more researching before I start coding.

from freqtrade-strategies.

hroff-1902 avatar hroff-1902 commented on May 16, 2024

closing it since the question was answered.
feel free to reopen

from freqtrade-strategies.

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.