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