Gamestudio Links
Zorro Links
Newest Posts
No errors in the command line
by JMMAC. 05/06/26 16:20
U4GM Where I Found Water Filters for Avian Alarm
by Hartmann846. 05/06/26 08:52
U4GM Why Black Ops 7 Campaign Feels So Different
by Hartmann846. 05/06/26 08:51
Purchase A8 full licence version
by jcl. 05/05/26 11:20
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (salisy), 5,860 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
salisy, Hartmann846, dangyc, ukgamer, valino
19213 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Live trading: indicator calculation not at end of bar #489353
04/07/26 21:51
04/07/26 21:51
Joined: Nov 2025
Posts: 17
C
clint000 Offline OP
Newbie
clint000  Offline OP
Newbie
C

Joined: Nov 2025
Posts: 17
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
Re: Live trading: indicator calculation not at end of bar [Re: clint000] #489358
04/08/26 21:47
04/08/26 21:47
Joined: Nov 2025
Posts: 17
C
clint000 Offline OP
Newbie
clint000  Offline OP
Newbie
C

Joined: Nov 2025
Posts: 17
figured it out...I was calling the asset function before having defined the BarPeriod and Lookback periods.
Would be great if Zorro compiler checked those declaration rules and told the uses about such inconsistencies....!


Thanks


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1