Bitcoin Forum

Economy => Trading Discussion => Topic started by: rubinho on March 13, 2018, 10:44:35 AM



Title: Binance indicators and TA-Lib
Post by: rubinho on March 13, 2018, 10:44:35 AM
Hi,

I am manually day trading altcoins on Binance.  I am also trying to automate my strategy using the ccxt library and TA-Lib indicators. 

Now I cannot seem to make the indicators in my application match what Binance gives me. 

In Binance, there are four input variables for StochRSI:

https://i.imgur.com/lVYyo8b.png

The first one I assume is time period (which is what it is in the web app).  The second is stddevs from mean.  CCXT takes four input arguments:

upperband, middleband, lowerband = BBANDS(close, timeperiod=21, nbdevup=2, nbdevdn=2, matype=0)

Close is the list of closing prices over the timeperiod, nbdev* are the stddevs from mean and matype determines the moving average calculation (0 is Simple Moving Average).  This seems to work, however when I query lowerband it gives me the number Binance says is the middle band.  So far so wierd. 

With StochRSI Binance gives four inputs:

https://i.imgur.com/lVYyo8b.png

RSI I assume is the time period
Stoch I assume is the slow time period
and the two others appear to be a smoothing factor (from what Google translate can tell me).

CCXT takes four arguments:

fastk, fastd = STOCHRSI(close, timeperiod=14, fastk_period=9, fastd_period=9, fastd_matype=0)

Close is the list of closing prices over the timeperiod, timeperiod is the main time period. fastk_period=9, fastd_period=9 are less clear as I am expecting a % deviation setting.  My other theory is that the fast_[dk] timeperiods should also be 14. 

Anybody have any clues?  Does Binance publish it's indicator calculations anywhere?

Thanks,

Rubinho