Gamestudio Links
Zorro Links
Newest Posts
Bug in train mode, or it seem to me
by jcl. 09/22/26 14:47
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 09/22/26 12:21
Capital slider is not saving in Z12
by Petra. 09/22/26 06:49
Parent/child object
by VoroneTZ. 09/22/26 05:52
Zorro tutorial ideas?
by AndrewAMD. 09/21/26 14:50
Trades during a running bar
by Martin_HH. 09/21/26 12:03
Avoiding pop-up training parameter results
by Martin_HH. 09/16/26 21:31
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 1,506 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Opus, Jubilee, lopezsergio07, mistery, lokkalyansamiti
19239 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: 19
C
clint000 Offline OP
Newbie
clint000  Offline OP
Newbie
C

Joined: Nov 2025
Posts: 19
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: 19
C
clint000 Offline OP
Newbie
clint000  Offline OP
Newbie
C

Joined: Nov 2025
Posts: 19
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