Code Monkey home page Code Monkey logo

Comments (4)

xmatthias avatar xmatthias commented on June 11, 2024

well the problem with pinescript is that it's not really fully open source - and we've observed time and time again that results do actually differ when transferred 1:1 to python.

Your 2nd call definitely also has a syntax problem.
freqtrade strategies usually use the abstract interface (import talib.abstract as ta)

that means, the first parameter is expected to be a dataframe (ta.MOM returns a series).
so

dataframe['mom1'] = ta.MOM((ta.MOM(dataframe, timeperiod=12)), timeperiod=1)

would have to become

dataframe['mom1'] = ta.MOM(dataframe, timeperiod=1, price='mom0')

.
now i'm not sure on the internal calculation of MOM ...

Ad hock, i'd say it's as simple as the following based on the tradingview code... but it's untested so take with caution.

lag = 12
dataframe['mom0'] = dataframe['close'] - dataframe['close'].shift(12)
dataframe['mom1'] = dataframe['mom0'] - dataframe['mom0'].shift(12)

I think both options should work - now if they yield what you expect / align with tradingview is an entirely different question ...

from freqtrade-strategies.

zeytindali83 avatar zeytindali83 commented on June 11, 2024

thank you for your help,

your paramaters work, but this time exits are not correct,

it will not wait enough,

it might be with related with this line "stop=high+syminfo.mintick"

can we change this line to python?

from freqtrade-strategies.

xmatthias avatar xmatthias commented on June 11, 2024

i've got no clue what high+syminfo.mintick is supposed to mean. Best look through the tradingview / pine documentation to find out.

from freqtrade-strategies.

alexeyromanko avatar alexeyromanko commented on June 11, 2024

@zeytindali83 hey! do you complete your adaptation or need help with?

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.