Comments (4)
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.
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.
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.
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)
- Trend Step Channel - appreciate it HOT 4
- resample_to_interval date shifted HOT 1
- Help with Trend Trader Strategy HOT 1
- ichimoku different value proposal HOT 1
- How to import external data to populate entry/exit trend conditions HOT 14
- Multiple timeframe merge HOT 10
- Laguerre RSI wrong computation HOT 3
- ```crossed``` function throws error with numpy integers
- utils bug HOT 4
- How to plot segtrends or gentrends using freqtrade plot-dataframe ? HOT 1
- Phase Change Index HOT 18
- I try to convert Predictive Ranges [LuxAlgo] to the py, whats the problem? HOT 7
- Involvement of Heikenashi candles could be helpful in trend prediction HOT 1
- Help needed with: AttributeError: 'SSL' object has no attribute 'copy' HOT 3
- warning util.py
- 16 tests failed HOT 4
- Pandas warning when setting fillna(0) on RMI calc HOT 2
- Issues with PMAX indicator HOT 1
- A few Pinescript lines HOT 2
- Error thrown at numpy_rolling_window HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from technical.