Gamestudio Links
Zorro Links
Newest Posts
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
ZorroGPT
by TipmyPip. 04/08/26 17:08
TMFs on options in live trading
by Spirit. 03/26/26 19:52
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Grant), 4,161 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ondrej, mredit, vestriaa, Lukudo, mldenoiser
19205 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: 16
C
clint000 Offline OP
Newbie
clint000  Offline OP
Newbie
C

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

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