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
2 registered members (EternallyCurious, howardR), 646 guests, and 0 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 2 of 2 1 2
Re: v 2.42.4 First entry into TMF with OrderDelay [Re: Zheka] #484389
10/19/21 00:18
10/19/21 00:18
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
I made a mistake in the prior code: of course, if TradeIsEntry then returning 4 will lead to a missed entry.

But returning 4 on the first run of a TMF, prevents TMF from running on subsequent ticks and leads to no entries at all ( it does in 2.37.3).
Code
int tmf() {
	
if (TradeIsNewBar) return 4;

 watch("#time=",tod(0));

	return 0;
}

function run() {
	NumYears=1;
	
	set(LOGFILE, TICKS);
			
	LifeTime=5;
	
	Entry=-3*PIP;
	
	if (NumOpenLong==0)
	 if (priceClose(0)>priceClose(20) ) 
		enterLong(tmf); 	 
}
produces:
Code
[103: Fri 21-01-08 07:00c] 1.22585/1.22687\1.22581/1.22641 -0.0
Enter Long EUR/USD  Entry -0.00030000 at 07:00:00
(EUR/USD::L) Long 1@1.22611 Entry limit

[104: Fri 21-01-08 08:00c] 0000 0 0/0 1.22641/1.22697\1.22329/1.22395 -0.0
(EUR/USD::L) Missed entry 1.2261 after 1 bar


Last edited by Zheka; 10/19/21 00:18.
Re: v 2.42.4 First entry into TMF with OrderDelay [Re: Zheka] #484401
10/22/21 09:46
10/22/21 09:46
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Confirmed. This will be fixed in the next beta.

Re: v 2.42.4 First entry into TMF with OrderDelay [Re: Zheka] #484415
10/23/21 19:43
10/23/21 19:43
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
v 2.43.1 fixes the problem.

Would appreciate if you could also improve on entry prices with OrderDelay:

When Slippage=0:

[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 60.0 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 <---price increased during the tick
time= 102 1.21079 1.21091 1.21070 1.21082 <--price further increased, made a new high
[EUR/USD::L44905] Long 1@1.21075 x at 01:02:00

With OrderDelay=60, the entry price should be 1.21081 at time =101. Why shouldn't it ?

When Slippage is not set/ left at default:

[103: Fri 21-01-08 07:00c] 1.22585/1.22687\1.22581/1.22641 -0.0
Enter Long EUR/USD Entry -0.00030000 Delay 60.0 at 07:00:00
(EUR/USD::L) Long 1@1.22611 Entry limit
time= 700 1.22585 1.22687 L=1.22581 C=1.22641
time= 701 1.22641 1.22641 L=1.22619 C=1.22626
time= 702 1.22641 1.22654 L=1.22619 C=1.22642
[EUR/USD::L10402] Long 1@1.22605 x at 07:02:00

How can the entry price be better than the low of the bar by the time of entry??




Last edited by Zheka; 10/23/21 19:44.
Page 2 of 2 1 2

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