Coder Social home page Coder Social logo

TKE indicator about technical HOT 4 CLOSED

freqtrade avatar freqtrade commented on May 4, 2024
TKE indicator

from technical.

Comments (4)

tarantula3535 avatar tarantula3535 commented on May 4, 2024 1

here is the code..i hope this is not wrong..

def TKEi(dataframe, length=14, emaperiod=5):
    """
    The calculation is simple:
    TKE=(RSI+STOCHASTIC+ULTIMATE OSCILLATOR+MFI+WIILIAMS %R+MOMENTUM+CCI)/7
    Buy signal: when TKE crosses above 20 value
    Oversold region: under 20 value
    Overbought region: over 80 value

    Another usage of TKE is with its EMA ,
    the default value is defined as 5 bars of EMA of the TKE line,
    Go long: when TKE crosses above EMALine
    Go short: when TKE crosses below EMALine
    """
    import talib.abstract as ta
    df = dataframe.copy()
    # TKE=(RSI+STOCHASTIC+ULTIMATE OSCILLATOR+MFI+WIILIAMS %R+MOMENTUM+CCI)/7
    df["rsi"] = ta.RSI(df, timeperiod=length)
    df['stoch'] = 100*(df['close']-df['low'].rolling(window=length).min())/(df['high'].rolling(window=length).max()-df['low'].rolling(window=length).min())
    df["ultosc"] = ta.ULTOSC(df,timeperiod1=7, timeperiod2=14, timeperiod3=28)
    df["mfi"] = ta.MFI(df, timeperiod=length)
    df["willr"] = ta.WILLR(df, timeperiod=length)
    df["mom"] = ta.MOM(df, timeperiod=length)
    df["cci"] = ta.CCI(df, timeperiod=length)
    df["TKE"] = (df["rsi"]+df["stoch"]+df["ultosc"]+df["mfi"]+df["willr"]+df["mom"]+df["cci"]) / 7
    df["TKEema"] = ta.EMA(df["TKE"],timeperiod=emaperiod)
    return df["TKE"],df["TKEema"]

from technical.

xmatthias avatar xmatthias commented on May 4, 2024

The code itself seems solid.

But this doesn't seem to be a very well known indicator ... the only references i found is the link you posted above - and the twitter-link (which is in the link above).

from technical.

tarantula3535 avatar tarantula3535 commented on May 4, 2024

hi guys in the explaniton MOM indicator is misundurstanding.. for this reason wron datas return..
can we change df["mom"] = ta.MOM(df, timeperiod=length)
this line with this
df["mom"] = ta.ROCR100(df, timeperiod=length)

from technical.

xmatthias avatar xmatthias commented on May 4, 2024

feel free to do a PR ;)

you're right, using MOM does not correspond do the pinescript code in the link...

from technical.

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.