Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by M_D. 04/26/24 20:22
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (M_D, Quad, Ayumi, AndrewAMD), 810 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
BarOffset and DST #485742
04/18/22 20:03
04/18/22 20:03
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
Greetings. I look into deploying a strategy that evaluates daily bars of US equities once per day. The default BarOffset of 940 would then sample the bars at 15:40 UTC, which if I am not mistaken would occur 10 minutes after open in winter months. But during summer months with DST, the market opens at 14:30 UTC. Does that mean Zorro would still sample at 15:40 UTC, so 70 minutes after open? Can I correct for this in the script by setting BarOffset depending on what dst() returns or is this variable read only once the session has started?

Re: BarOffset and DST [Re: MegaTanker] #485743
04/18/22 23:37
04/18/22 23:37
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
BarZone=ET;
BarOffset=16*60;
BarPeriod=1440;

Re: BarOffset and DST [Re: MegaTanker] #485753
04/19/22 08:08
04/19/22 08:08
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
BarZone looks like what I need but it doesn't seem to be doing anything. The timestamps of the bars in the chart remain unchanged and when I try triggering something with the hour() function, it still uses the default timezone. Tried various settings, EST, CET and just integers

Re: BarOffset and DST [Re: MegaTanker] #485754
04/19/22 08:21
04/19/22 08:21
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
Look in the log for timestamps, not chart (of daily? bars). If you indeed use daily bars, how/why would you "trigger something" based on hour()? Look in the manual for hour() (and 1 line beneath).

Re: BarOffset and DST [Re: MegaTanker] #485755
04/19/22 08:48
04/19/22 08:48
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
I used hour bars just to test how BarZone behaves, to better understand it. Even the logfile still has the first bar at 15:00 with BarZone set to EST, same as with BarZone set to UTC.

Perusing the manual, I found a line in the release history, which says "The BarZone variable can be used to shift daily bars to a certain local time zone." So I guess this feature is designed only for daily bars. Then it makes sense that hourly bars don't work.

Re: BarOffset and DST [Re: MegaTanker] #485757
04/19/22 10:11
04/19/22 10:11
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
https://zorro-project.com/manual/en/log.htm

BarZone is for all bars. But of course you would see no different bar timestamps in the log when you use 1H bars.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1