Gamestudio Links
Zorro Links
Newest Posts
Price of entry with OrderDelay
by Zheka. 10/18/21 23:50
Easiest way to get 1m History?
by Grant. 10/18/21 22:31
Lapsa's very own thread
by Lapsa. 10/18/21 21:09
Is it possible to find robust systems?
by Mariano. 10/18/21 20:59
Orders not found
by dpn. 10/18/21 18:09
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 10/18/21 13:49
What are you working on?
by rayp. 10/17/21 12:01
AUM Magazine
Latest Screens
Tactics of World War I
Hecknex World
Scheherazade's Journey
Paradox Vector
Who's Online Now
11 registered members (Leohermoso, 3run, Lapsa, AndrewAMD, dpn, mk_1, Mariano, Grant, Quad, Dooley), 450 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mariano, KoenC, Cuttyflame, Chiller, Avedon
18694 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Price of entry with OrderDelay #484359
10/14/21 12:17
10/14/21 12:17
Joined: Jul 2017
Posts: 588
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 588
1) Using OrderDelay in Test, I have noticed that prices are different from those at the "timestamped" moments.

Say, with OrderDelay=59.9 and using M1 ticks, the timestamp of a trade is the first tick of a new bar (say, 8:01).

But the 'fill price' is different from that of a Close of 8:01 tick, or that of a 8:00 tick, and not by a spread or anything easily explainable.

So, Zorro must be doing some interpolation (though Slippage is set to 0).

Theoretically, such interpolations should make no material difference on a large sample of trades, BUT this is not what I am seeing.

On a sample of 23K+ trades across 11 currency pairs, entry prices with OrderDelay=59.9 are - on average - 0.4-0.6 pips BETTER than those at exact bar boundaries and even more so than at the next M1 tick.
This effect is quite similar for each pair.

So, how exactly does Zorro arrive at fill prices in the Test in this scenario and what would be the way to match it in Live?


2) Setting OrderDelay<60, leads to interpolations of prices somewhat closer to at exact bar boundaries; setting OrderDelay= 60-119.9 - closer to at the second M1 tick.

What would be the way to ensure that the fill price in Test is exactly at the 'close' of an M1 tick?

Not being able to do it is very inconvenient when reconciling Live vs Test for monitoring quality of execution.

Re: Price of entry with OrderDelay [Re: Zheka] #484370
10/16/21 00:03
10/16/21 00:03
Joined: Jul 2017
Posts: 588
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 588
To support the above, this script
Code
int tmf() {
	
	if (TradeIsPending)
   	watch("#time=",tod(0), priceOpen(0), priceHigh(0), priceLow(0),priceClose(0));
	
	return 0;
}

function run() {
	NumYears=1;
	
	set(LOGFILE, TICKS);

	Verbose=3;
	
	Slippage=0;
	RollLong=RollShort=Spread=Commission=0;
	
	LifeTime=5;
	
	Entry=-3*PIP;
	
	OrderDelay=59.9; //119.9, 120.0
	
	if (NumOpenLong==0)
	 if (priceClose(0)>priceClose(20) ) 
		enterLong(tmf); 
}

produces this output at different OrderDelay:

[165: Wed 21-01-13 00:00c] -2.74 0 1/3 1.22061/1.22104\1.22025/1.22094 -0.0
Enter Long EUR/USD Entry -0.00030000 Delay 59.9 at 00:00:00
(EUR/USD::L) Long 1@1.22064 Entry limit
time= 0 1.22061 1.22104 1.22025 1.22094
time= 1 1.22094 1.22102 1.22094 .22102
[EUR/USD::L16602] Long 1@1.22094 x at 00:01:00

[151: Tue 21-01-12 10:00] 1.21527/1.21797\1.21509/1.21624 -0.0
Enter Long EUR/USD Entry -0.00030000 Delay 60.0 at 10:00:00
(EUR/USD::L) Long 1@1.21594 Entry limit
time= 1000 1.21527 1.21797 1.21509 1.21624
time= 1001 1.21624 1.21636 1.21614 1.21629
[EUR/USD::L15202] Long 1@1.21619 x at 10:01:00

[213: Fri 21-01-15 00:00c] -10.75 0 1/7 1.21532/1.21595\1.21507/1.21513 -0.00003
Enter Long EUR/USD Entry -0.00030000 Delay 118.9 at 00:00:00
(EUR/USD::L) Long 1@1.21483 Entry limit
time= 0 1.21532 1.21595 1.21507 1.21513
time= 1 1.21513 1.21518 1.21512 1.21515
time= 2 1.21513 1.21522 1.21512 1.21522
[EUR/USD::L21403] Long 1@1.21510 x at 00:02:00

[448: Fri 21-01-29 01:00c] -14.80 0 14/15 1.21216/1.21226\1.21043/1.21079 -0.0
Enter Long EUR/USD Entry -0.00030000 Delay 118.9 at 01:00:00
(EUR/USD::L) Long 1@1.21049 Entry limit
time= 100 1.21216 1.21226 1.21043 1.21079
time= 101 1.21079 1.21087 1.21070 1.21081
time= 102 1.21079 1.21091 1.21070 1.21081
[EUR/USD::L44905] Long 1@1.21075 x at 01:02:00

[1236: Wed 21-03-17 18:00c] 1.19022/1.19109\1.18983/1.19106 -0.0
Enter Long EUR/USD Entry -0.00030000 Delay 118.9 at 18:00:00
(EUR/USD::L) Long 1@1.19076 Entry limit
time= 1800 1.19022 1.19109 1.18983 1.19106
time= 1801 1.19106 1.19457 1.19106 1.19418
time= 1802 1.19106 1.19625 1.19106 1.19598
[EUR/USD::L23713] Long 1@ 1.19403 x at 18:02:00

[347: Fri 21-01-22 17:00c] -11.27 0 10/11 1.21727/1.21824\1.21711/1.21782 -0.0
Enter Long EUR/USD Entry -0.00030000 Delay 120.0 at 17:00:00
(EUR/USD::L) Long 1@1.21752 Entry limit
time= 1700 1.21727 1.21824 1.21711 1.21782
time= 1701 1.21782 1.21799 1.21782 1.21787
time= 1702 1.21782 1.21799 1.21778 1.21782
time= 1703 1.21782 1.21799 1.21773 1.21785
[EUR/USD::L34804] Long 1@1.21778 x at 17:03:00

[646: Wed 21-02-10 13:00] -13.81 0 21/26 1.21249/1.21250\1.21138/1.21173 -0.0
Enter Long EUR/USD Entry -0.00030000 Delay 120.0 at 13:00:00
(EUR/USD::L) Long 1@1.21143 Entry limit
time= 1300 1.21249 1.21250 1.21138 1.21173
time= 1301 1.21173 1.21189 1.21151 1.21158
time= 1302 1.21173 1.21189 1.21150 1.21169
time= 1303 1.21173 1.21189 1.21150 1.21173
[EUR/USD::L64707] Long 1@ 1.21162 x at 13:03:00


'Slippage' also works in some interesting ways:

//------------------if Slippage is not 0.--------------
[260: Tue 21-01-19 02:00] -14.97 +1.33 2/9 (1.20939)
time= 201 1.20939 1.20941 1.20936 1.20938
[EUR/USD::L25503] Expired 1@1.20942:[ +1.36 at 02:01:00 <---exit price is bigger than high of the tick??

[261: Tue 21-01-19 03:00] -13.61 0 2/9 (1.20953)
(EUR/USD::L) Long 1@1.20923 Entry limit
time= 300 1.20939 1.20987 1.20914 1.20953
time= 301 1.20953 1.20956 1.20931 1.20932
time= 302 1.20953 1.20956 1.20930 1.20935
[EUR/USD::L26203] Long 1@1.20928 x at 03:02:00 <---entry price is smaller than the lowest low of the first 2 ticks?


Last edited by Zheka; Yesterday at 23:49.
Re: Price of entry with OrderDelay [Re: Zheka] #484379
Yesterday at 16:51
Yesterday at 16:51
Joined: Jul 2017
Posts: 588
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 588
Formatting does not seem to work:-( I cannot color-highlight or underline relevant prices...

Re: Price of entry with OrderDelay [Re: Zheka] #484380
Yesterday at 17:31
Yesterday at 17:31
Joined: Aug 2017
Posts: 56
Netherlands
G
Grant Online
Junior Member
Grant  Online
Junior Member
G

Joined: Aug 2017
Posts: 56
Netherlands
Unfortunately the color tab only works outside a code-tag

Re: Price of entry with OrderDelay [Re: Zheka] #484388
Yesterday at 23:50
Yesterday at 23:50
Joined: Jul 2017
Posts: 588
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 588
Thank you! I modified the post above.


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