Gamestudio Links
Zorro Links
Newest Posts
long time to load data
by qin. 12/29/25 14:06
The new evaluation shell
by jcl. 12/29/25 09:56
about Zorro S (monthly)
by AndrewAMD. 12/29/25 03:24
Xor Memory Problem.
by TipmyPip. 12/26/25 19:14
ZorroFix. ini /data and /log path
by Martin_HH. 12/19/25 21:02
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (Quad, AndrewAMD, vicknick), 8,212 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Syndrela, HDRSEO, AOUNZA, digitalboy381, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Correctly handling different trading hours per asset #484830
12/14/21 13:08
12/14/21 13:08
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
I wanted to live test a strategy the other day that trades different index CFDs but quickly had an order rejected because it was generated at the close of the last bar of the trading day, so I need to handle this within the script. Please let me know if this is the correct approach:

- The BR_FLAT flag is necessary, because otherwise the first selected asset is used to determine the trading hours based on when bars are unavailable in the history, which could end up "swallowing" legitimate bars from assets that have different trade hours.

- With BR_FLAT enabled, can I set asset-specific StartMarket and EndMarket times?

- If an order is generated at the close of the last bar before EndMarket, will this order be automatically delayed until the StartMarket open, or do I need to handle this in the script manually?

Re: Correctly handling different trading hours per asset [Re: MegaTanker] #484834
12/14/21 16:28
12/14/21 16:28
Joined: Jul 2000
Posts: 28,044
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,044
Frankfurt
Yes, use BR_FLAT when you trade assets on different markets. Start/EndMarket are normally not needed, just check the market hours by script before entering a trade. When you want to skip price series or indicators outside market hours, use the NOSHIFT flag.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1