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; 10/18/21 23:49.