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
7 registered members (EternallyCurious, 7th_zorro, Ayumi, Quad, AndrewAMD, ricky_k, 1 invisible), 497 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 9 of 20 1 2 7 8 9 10 11 19 20
Re: One Night Stand System [Re: Sphin] #456471
11/24/15 09:59
11/24/15 09:59
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
I do not know the code in such detail, but would not expect that you can open a trade on the last bar. By default, trades open at the Open of the next bar. With no next bar, I don't think that a trade will open.

Also I think your problem is now clear: if the day is important for your trade, it's not good to enter trades exactly at midnight or just at the start of the weekend. The PC time is never this precise. If the server time is a microsecond slower than your PC time, you might get a tick with a 23:59:59.9999 time stamp, while your PC clock has already the next day at 00:00:00.0001. This is different to the backtest when tick time and PC time are always in sync. So better check the whole time and not only the day. Or set the bar offset so that your daily bars do not change exactly at midnight.

I will also mention this potential trap in the manual.

Re: One Night Stand System [Re: jcl] #456489
11/24/15 18:57
11/24/15 18:57
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Oops - big misunderstanding. It seemed to me that the time in the field "Server" is the UTC of the broker's server and this is the one and only time authority that says 00:00 and therewith rings in the beginning of a new day etc. I didn't think of local time having any effect to time events during trading. But okay, if so a BarOffest of 5 minutes should solve the problem. Thanks!

Re: One Night Stand System [Re: Sphin] #456535
11/27/15 14:31
11/27/15 14:31
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
I had 3 pending trades setup and 2 execute today.

Re: One Night Stand System [Re: RTG] #456547
11/27/15 21:59
11/27/15 21:59
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
I had also pending trades and strange errors when Zorro tried to execute two of them, three had been executed. I reported the execution problems in Beta Test Area concerning 1.40 because I'm not quite sure if they are related to the new version I'm already using.

You realized the solution of our problem that Zorro did not setup trades? It must have been a time sync problem and can be avoided if "BarOffest = 5" e.g. is added to the run function, so the daily bars are shifted 5 minutes after midnight and therewith surely after the change of the day.

I menawhile changed the assets in my asset loop slightly concerning to their performance over the time that is available. Oversampling might be still another possibility as jcl stated in his actual entry in his blog, but I didn't try it so far. So my assets are actualy for the ONS:

"AUD/JPY","AUD/USD","CHF/JPY","EUR/JPY","EUR/USD","GBP/USD","NZD/CHF","NZD/JPY","USD/CHF","USD/JPY","USOil"





Re: One Night Stand System [Re: Sphin] #456548
11/27/15 22:43
11/27/15 22:43
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
Is the BarOffset required for Zorro versions after 1.32?

Re: One Night Stand System [Re: RTG] #456549
11/27/15 22:58
11/27/15 22:58
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
I think it does not depend on the Zorro version, in my case 1.32 didn't trade too without it.

Re: One Night Stand System [Re: Sphin] #456585
11/30/15 00:08
11/30/15 00:08
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
Mine exited correctly this morning.


Attached Files ONS 30-11-2015.jpg
Last edited by RTG; 11/30/15 00:10.
Re: One Night Stand System [Re: RTG] #456586
11/30/15 00:25
11/30/15 00:25
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
I guess you got a perfect time sync! So nice BarOffset might be, it involves a new fact that isn't. While it is negligible if the entry stops are set 5 minutes earlier or later, closing positions that try to exploit a weekend gap only 5 minutes after the market has started again after weekend might have an impact on the result that is unfortunately confirmed by the backtest. As from the manual BarOffset must not change during the script run I tried to find another solution. I did some experiments with TMFs that I expected to be able to watch the market but those tries were completely running down the drain because of strange effects I can't explain (yet). So my only workaorund actually is setting BarOffset = 1 hoping this delay is sufficient to get the change of day for the entry clearly. But I'm working on ... laugh

Re: One Night Stand System [Re: Sphin] #456587
11/30/15 00:58
11/30/15 00:58
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
No BarOffset set (other than what maybe set by default) on that version of the script which executed those trades.

Re: One Night Stand System [Re: RTG] #456592
11/30/15 11:35
11/30/15 11:35
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
If midnight is really the best for that system, leave BarOffset at 0. Just check if the current hour is 23 or 0 before comparing the week day. This is anyway the proper solution when you don't want to delay the trades through BarOffset.

Page 9 of 20 1 2 7 8 9 10 11 19 20

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