Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 959 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Adjusting market hours to DST #487712
08/07/23 19:16
08/07/23 19:16
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
I have minute data in UTC format from Xetra, so half of the year the first bar is at 07:00, the other half it begins at 08:00.

I want Zorro to cut out the first and last 5 minute candles of each day because the data here is unreliable due to the widening spread.

I can use StartMarket and EndMarket but I can't seem to adjust this for DST. I guess it's fixed once it's set so every day begins at 08:05 for example, despite setting StartMarket to 0705 when the timezone changes.

I tried working with AssetMarketStart/AssetMarketEnd but same problem there.

Is there a way to do this?

Re: Adjusting market hours to DST [Re: MegaTanker] #487714
08/08/23 15:54
08/08/23 15:54
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
This is just a wild guess, but can't you adjust StartMarket and EndMarket by placing them into an if-statement? So something like:

Code
if(month() < 00 && day() < 00)
{StartMarket = 0000;
EndMarket = 0000;}
else
{StartMarket = 0000;
EndMarket = 0000;}

Last edited by Grant; 08/08/23 15:55.
Re: Adjusting market hours to DST [Re: MegaTanker] #487717
08/09/23 19:59
08/09/23 19:59
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
Nope, as mentioned in my post, this seems to be fixed once set. All bars then start at the same time throughout the year, even when adjusting StartMarket by an hour when dst() signals a timezone change

Re: Adjusting market hours to DST [Re: MegaTanker] #487718
08/09/23 20:09
08/09/23 20:09
Joined: Feb 2017
Posts: 1,726
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,726
Chicago
Just because your data is in UTC does not mean AssetMarketZone has to be in UTC. Change it to one with DST and adjust AssetMarketStart/AssetMarketEnd likewise.

Edit: If you're only doing the one asset, change BarZone, StartMarket, and EndMarket only for an easier time. Finally, make sure you have the appropriate BR_LOCAL configuration.

Last edited by AndrewAMD; 08/09/23 20:16.
Re: Adjusting market hours to DST [Re: MegaTanker] #487723
08/12/23 09:23
08/12/23 09:23
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
Correct way was just to set BarZone to CET and then set StarMarket and EndMarket just once. Don't need to adjust it when Zorro already adjusts the times to CET and thus StartMarket stays consistent throughout the year.

Re: Adjusting market hours to DST [Re: MegaTanker] #487724
08/12/23 14:28
08/12/23 14:28
Joined: Feb 2017
Posts: 1,726
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,726
Chicago
Note that different timezones have different date periods for DST:
https://en.wikipedia.org/wiki/Daylight_saving_time_by_country

If I had to trade a global portfolio, I would manipulate timeframes instead of using the standard StartMarket / EndMarket variables.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1