Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Edgar_Herrera, VoroneTZ, Akow), 973 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Bar mode flags vs. weekend parameter #479046
02/08/20 10:42
02/08/20 10:42
Joined: Dec 2017
Posts: 14
V
vince Offline OP
Newbie
vince  Offline OP
Newbie
V

Joined: Dec 2017
Posts: 14
Hi,

since https://opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=478863#Post478863 is still unanswered and the thread is closed now, let's try it here again:

Quote
Originally Posted by jcl
The Z systems have their own bar mode flags, so the weekend parameter is not needed anymore.


With the weekend parameter we had two holidays included by default:
"December 25 and January 1 count as weekend. Other holidays are not automatically included, but can be taken account of in the script."
25.12. is also included in the new bar mode on Z strategies, but apparently the 1.1. is not...
Tested with Zorro 2.20.2:
Z2 tried to open several positions during New Year's Day and wanted to close one position here. After the market opened again at 23:00 it immediately closed that position under very bad conditions (huge spread due to just opened market). The positions it previously wanted to open on 1.1. it didn't try again after the market opened, though.
Is there any way to specify the holidays / market closed periods for the Z strategies? Or is it just a bug in the bar mode flags or the usage in the Z strategies scrips that will be fixed in the future?
Thanks.

Re: Bar mode flags vs. weekend parameter [Re: vince] #479061
02/11/20 11:55
02/11/20 11:55
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
January 1 is still a holiday. I'm sorry that you lost money, but it is certainly not due to "huge spread" and adding more holidays would not help. If you would declare January 2 also a holiday, then that trade would be closed on January 3 with a likely even worse result.

Re: Bar mode flags vs. weekend parameter [Re: jcl] #479067
02/11/20 19:36
02/11/20 19:36
Joined: Dec 2017
Posts: 14
V
vince Offline OP
Newbie
vince  Offline OP
Newbie
V

Joined: Dec 2017
Posts: 14
Originally Posted by jcl
January 1 is still a holiday.

But why did Z2 then try to trade on that day? I got several "can't close" and "can't open" messages during January 1. On Christmas on the other hand Zorro properly suspended trading:
Code
Market closes on 25.12. 00:00
Market opens on 26.12. 00:00

Originally Posted by jcl
I'm sorry that you lost money, but it is certainly not due to "huge spread" and adding more holidays would not help.

Well, the trade was closed with profit...
But I still think that opening or closing a trade immediately after the markets opened (--> big spread) is not beneficial and waiting until spreads came down to a more normal level is a better option. I guess if the strategy properly suspended trading on 1.1. it would not have closed the trade at the first chance it could (to rectify the previous omission of the closing) but would maybe have decided only at the next "strategy action time" at 1:xy AM to close it.
Markets opened at 23:00 and Zorro closed the trade at 23:00:03 (22:00:01 in Zorro's log)):
Code
[Wed 20-01-01 08:06] ...
Error 075 [EUR/USD:CY:L0179] - can't close 1@0.0 at 08:06:01
(EUR/USD:CY:S) Short 4@1.12216 Entry limit
(USD/CAD:HP:L) Long 3@1.29893 Entry limit
Error 075 [EUR/USD:CY:L0179] - can't close 1@0.0 at 08:06:01
Error 075: (AUD/USD:CY:S) - can't open 2@0.0013000 Stop 0.069771 at 08:06:01

[Wed 20-01-01 12:06] ...
Error 075 [EUR/USD:CY:L0179] - can't close 1@0.0 at 12:06:00
Error 075: (EUR/USD:CY:S) - can't open 4@0.00090000 Stop 0.044253 at 12:06:00
Error 075: (USD/CAD:HP:L) - can't open 3@0.0 Stop 0.047206 at 12:06:00

[Wed 20-01-01 16:06] ...
(USD/CAD:CY:L) Long 4@1.29900 Entry limit
Error 075 [EUR/USD:CY:L0179] - can't close 1@0.0 at 16:06:01

[Wed 20-01-01 20:06] ...
Error 075 [EUR/USD:CY:L0179] - can't close 1@0.0 at 20:06:00
Error 075: (USD/CAD:CY:L) - can't open 4@0.0 Stop 0.048620 at 20:06:00
[EUR/USD:CY:L0179] Sell 3@1.12122: +29.49 at 22:00:01


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1