Here a quick question as I am struggling with live trading.

I am doing a simple ATR calculation through: myATR=series(ATR(100)); and plotting it through plot("ATR",myATR,NEW,RED); which works fine in the backtests.
However when I go on live trading (15min bars) the calculation seems to be happening on each tick rather than at the end of each bar, as the ATR quickly decays. An extract from the strategy website monitor shows the decay of the ATR in between bars, looking like it is recalculated as each incoming tick is processed. I confirm I have not enabled the TICKS flag and also I would not expect the run() function to be called at each tick.

As the take profit and stop loss are defined as multiples of the ATR, having a low ATR value due to the decay causes the strategy to enter in and out of trades incorrectly.

What am I doing wrong??

Thank you!

Attached Files zorro.JPG