BitMEX-simple-trading-robot icon indicating copy to clipboard operation
BitMEX-simple-trading-robot copied to clipboard

ohlcv df needs to be flipped

Open cryptonaut1357 opened this issue 5 years ago • 3 comments

thx for the code! (especially for the insight to divide timestamp by waitingtime :))

I noticed that the output of ohlcv_candles needs to be flipped (ohlcv_candles.iloc[::-1]) to get the last values with [-1] and [-2]

regards

cryptonaut1357 avatar Aug 24 '18 10:08 cryptonaut1357

Hi @cryptonaut1357 can you share your code I also notice this one resulting to indicators incorrect calculations.

adacumos avatar Sep 27 '18 11:09 adacumos

To awnser the question how to flip cryptonaut1357 already said it but ill try to clear up with a sample

Original: macd, signal, hist = talib.MACD(ohlcv_candles.close.values, fastperiod=8, slowperiod=28, signalperiod=9)

Candles fliped: macd, signal, hist = talib.MACD(ohlcv_candles.iloc[::-1].close.values, fastperiod=8, slowperiod=28, signalperiod=9)

hstaford avatar May 11 '19 17:05 hstaford

hi how can ı change order ,when send buy 100 usd new order it while closing with sell order ı want continue 100 usd sell order if open buy 100 usd order ,sell order will be 200 usd ,after buy order again will be 200 usd

alituzcu avatar May 23 '20 17:05 alituzcu