Mar-20-2022, 12:59 PM
bars = exchange.fetch_ohlcv(symbol, timeframe=zamanAraligi, since=None, limit=500) df = pd.DataFrame(bars, columns=["timestamp", "open", "high", "low", "close", "volume"]) #ema control e8 = ta.ma("ema", df.close, length=8) e13 = ta.ma('ema', df.close, length=13) e21 = ta.ma('ema', df.close, length=21) e55 = ta.ma('ema', df.close, length=55) total = 0 if any(e8 > e13): total += 1 else: total -= 1 if any(e13 > e21): total += 1 else: total -= 1 if any(e21 > e55): total += 1 else: total -= 1 print("rating =", total)no matter what I do it always returns the result as 3 but this result is not correct, it always returns 3 where the result should be 2 or -1 where it should be.