Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Behavior of StartDate = NOW; #485782
04/21/22 09:34
04/21/22 09:34
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
According to the manual StartDate = NOW; will immediately trigger a run() in Trade mode which is useful for strategies that rebalance portfolios once in a while or similar.

It sounds useful for me but I must know how this affects bar generation. If it immediately builds a bar upon starting the session, does it use the last 24 hours with daily candles? Does it generate the Lookback period based on the current time such that all candles close and open consistently at this time of the day? Or does it still use the variables such as BarOffset to generate the bars normally, thus making only the last bar "malformed" if the session start doesn't align with the BarOffset in the script?

I tried figuring this out by logging the current timestamp at every bar, and it still prints the time determined by BarOffset, even for the first bar that is executed at session start, which doesn't align with the real time at that moment.

Last edited by MegaTanker; 04/21/22 09:36.
Re: Behavior of StartDate = NOW; [Re: MegaTanker] #485783
04/21/22 10:26
04/21/22 10:26
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Yes, lookback etc still work. It only runs immediately at start and then at each normal bar boundary.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1