For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
How to use EMA without a strategy
I want to use backtrader EMA without a strategy to calculate EMA for an array of close values, but I don't know how the data should look like in order for backtrader to accept it
from backtrader.indicators import EMA random_array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] value = EMA(random_array, period=10) print(value) #output: IndexError: array index out of range
it's impossible, use ta-lib ...
run-out last edited by