Does anybody know if there is a limit for the number of periods on a function like DEMA?
Following program runs in backtest(one minute timeframe) but not live. I’m getting the message to increase preloadbars, which I have done
thx Klaus
defparam preloadbars =2000
once ldema=0
xDEMA = 1050
cDEMA = dema[xDEMA](close)
DEMAcond = cDEMA < lDEMA
lDEMA = cDEMA
if demacond then
buy 1 contracts at market
else
sell at market
endif
I know someone who trade Hull moving average of 5000 periods in seconds timeframe.. So I guess it’s possible.
What is the error of live trading?
It says to increase Preloadbars, which was already done.
But anyhow, I changed program logic to circumvent the problem