ccxt使ってbitMEX 移動平均計算

5分足で10足MA

#移動平均計算
timest = bitmex.fetch_ohlcv('BTC/USD',timeframe='5m',limit=10,params={'reverse': True})
total = 0
for index,item in enumerate(timest):
	total = total + item[4]

ma = total / len(timest)

print(ma)