Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 677 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
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