Mar-19-2022, 05:35 PM
Unfortunately it didn't work sir, I reconfigured my codes as follows
Ema 8 = 3.341592238802603
Ema 13 = 3.346348533185547
Ema 21 = 3.34587458698077
Ema 55 = 3.311466932868334
rating = 0
accordingly the rating should have been 2 but the value is returning 0.
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) #ema rating sum = 0 if any(e8 > e13): sum = 1 if any(e8 < e13): sum = 0 if any(e13 > e21): sum = 1 if any(e13 < e21): sum = 0 if any(e21 > e55): sum = 1 if any(e21 < e55): sum = 0 print("Ema 8 = " + str(e8[len(df.index) - 2])) print("Ema 13 = " + str(e13[len(df.index) - 2])) print("Ema 21 = " + str(e21[len(df.index) - 2])) print("Ema 55 = " + str(e55[len(df.index) - 2])) print("rating = " + str(sum))I used the following prites to check the results, the returning values are as follows;
Ema 8 = 3.341592238802603
Ema 13 = 3.346348533185547
Ema 21 = 3.34587458698077
Ema 55 = 3.311466932868334
rating = 0
accordingly the rating should have been 2 but the value is returning 0.