easyai / python-charting-indicators Goto Github PK
View Code? Open in Web Editor NEWThis repository contains a python file with is used to calculate charting indicators.
License: MIT License
This repository contains a python file with is used to calculate charting indicators.
License: MIT License
Hi i'm using get_MACD function and i use this function to get candles
candles = bot.get_klines(symbol="BTCUSDT", interval=bot.KLINE_INTERVAL_1MINUTE)
and this is my candles output:
[[unixtime, open, high, low, close, volume], ...]
and i get this error:
TypeError: cannot perform reduce with flexible type
Hello,
a request, if possible, to add MACD zero lag indicator
Thanks
ADX indicator is wrong calculated.
+DI and -DI are OK, but not ADX
I were not able to figure where to correct it.
Hello,
I thing MACD zero lag calculation is not the correct one, I don't have any match with a TradingView MACD 0 lag chart.
I used to made it work with DEMA formula, perfect match with TradingView. This made me work my Python :)
You can used it:
def get_DEMA(prices, maPeriod, prec=8):
EMA1 = get_EMA(prices, maPeriod)
EMA2 = get_EMA(EMA1, maPeriod)
DEMA = np.subtract ((2 * EMA1[:len(EMA2)]), EMA2)
return DEMA.round(prec)
def get_zeroLagMACD(prices, Efast=12, Eslow=26, signal=9):
z1 = get_DEMA (prices, Efast)
z2 = get_DEMA (prices, Eslow)
lineMACD = np.subtract (z1[:len(z2)], z2)
lineSIGNAL = get_DEMA (lineMACD, signal)
histogram = np.subtract(lineMACD[:len(lineSIGNAL)], lineSIGNAL)
return [({
"macd":float("{0}".format(lineMACD[i])),
"signal":float("{0}".format(lineSIGNAL[i])),
"hist":float("{0}".format(histogram[i]))}) for i in range(len(lineSIGNAL))]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.