Gamestudio Links
Zorro Links
Newest Posts
IG plugin initial release
by sodiumchloride. 09/22/20 20:53
Using STL in Zorro strategies
by AndrewAMD. 09/22/20 17:01
Rubbish data from Yahoo
by DanielX. 09/22/20 14:37
assert
by Grat. 09/22/20 12:14
MT4 - use more Zorro script
by Grat. 09/22/20 06:49
Single advise model for portfolio
by jmlocatelli. 09/21/20 19:41
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
4 registered members (Dooley, kvm, AndrewAMD, jmlocatelli), 445 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
NewBorn, 3dvg, secretagentman, distribution, EditeY
18515 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 5 of 10 1 2 3 4 5 6 7 9 10
Re: New Zorro version 2.30 [Re: jcl] #481054
08/03/20 14:31
08/03/20 14:31
Joined: Jul 2000
Posts: 27,343
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,343
Frankfurt
Yes. Sorry, I forgot to mention it in the post.

Re: New Zorro version 2.30 [Re: jcl] #481055
08/03/20 14:56
08/03/20 14:56
Joined: Jul 2017
Posts: 499
Z
Zheka Offline
Senior Member
Zheka  Offline
Senior Member
Z

Joined: Jul 2017
Posts: 499
You cannot reasonably ask for 'each line number with a bug'.

At each bar when an entry triggers, compare the price of "0.5*atr entry stop" (intended) with the actual entry price at "Long1@".
Quote
[99: Wed 20-01-08 14:00] -6.41 -0.0500 3/9 (1.11200)
(EUR/USD::L) Long 1@1.11362 Entry stop
0.5*atr entry stop=1.11254
[EUR/USD::L10002] Long 1@1.11249 x at 14:31:00
Actual entry price is always more favorable.

To demonstrate that this is actually the price from "1-tick earlier", here is a more detailed log with each tick printed.


Attached Files
Last edited by Zheka; 08/03/20 14:56.
Re: New Zorro version 2.30 [Re: jcl] #481056
08/03/20 15:24
08/03/20 15:24
Joined: Jul 2017
Posts: 499
Z
Zheka Offline
Senior Member
Zheka  Offline
Senior Member
Z

Joined: Jul 2017
Posts: 499
This is the script used (same as in the very first message).

It's "inflated" equity curve is just an 'automated' way to show that 'peeking' is consistent; and the magnitude is clear by comparing to a benchmark (Entry=0.5*atr; enterLong(); ) where Entry prices are correct.

Attached Files
ea_tmf2_stopEntry.c (13 downloads)
Re: New Zorro version 2.30 [Re: jcl] #481057
08/04/20 05:44
08/04/20 05:44
Joined: Jul 2000
Posts: 27,343
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,343
Frankfurt
Ok, do I understand it right: The problem was not that the entry stop happened 1 tick early, the problem was that your TMF opened the trade 1 tick early?

Re: New Zorro version 2.30 [Re: jcl] #481058
08/04/20 10:02
08/04/20 10:02
Joined: Jul 2017
Posts: 499
Z
Zheka Offline
Senior Member
Zheka  Offline
Senior Member
Z

Joined: Jul 2017
Posts: 499
Sorry, I do not understand the question.

When a price exceeds a certain level (0.5*atr), a trade is entered by the tmf returning 2.

However, Zorro internally records the entry price from 1 tick before the entry time.
Quote
in tmf: 13:18:00, high = 1.14464, close = 1.14462
in tmf: 13:19:00, high = 1.14464, close = 1.14441
in tmf: 13:20:00, high = 1.14483, close = 1.14480 <--this is when a price exceed 1.14473 and the trade is entered by tmf returning 2
---- long Entry Stop is hit!----open=1.14394, high=1.14483 close=1.14480 entStp=1.14473
[EUR/USD::L08101] Long 1@1.14441 x at 13:20:00
Trade :L080101 is entered at 13:20 with the price at 13:19.

Re: New Zorro version 2.30 [Re: jcl] #481059
08/04/20 10:14
08/04/20 10:14
Joined: Jul 2000
Posts: 27,343
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,343
Frankfurt
Ok. I assumed it was an entry stop issue. We cannot confirm a TMF fill price from 1 tick earlier either, so possibly something else is wrong. But I think at least I understand now the problem and we can check it. Sorry for being dull.

Re: New Zorro version 2.30 [Re: jcl] #481060
08/04/20 10:42
08/04/20 10:42
Joined: Jul 2017
Posts: 499
Z
Zheka Offline
Senior Member
Zheka  Offline
Senior Member
Z

Joined: Jul 2017
Posts: 499
The script cannot be simpler, and the logs are what they are.

Quote
We cannot confirm a TMF entry price from 1 tick earlier either
I see 0 downloads of my script; so not sure what exactly has been used to confirm the problem.
May I pls ask you to actually run the provided script and post the same part of the log that I posted, for 19-01-07 13:00?

Last edited by Zheka; 08/04/20 10:47.
Re: New Zorro version 2.30 [Re: jcl] #481061
08/04/20 11:05
08/04/20 11:05
Joined: Jul 2000
Posts: 27,343
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,343
Frankfurt
Don't worry about your script. We have our test programs for this. We'll find the problem.

Until this is resolved, use the normal Entry variable for an entry stop, not your TMF.

Re: New Zorro version 2.30 [Re: jcl] #481063
08/04/20 14:23
08/04/20 14:23
Joined: Jul 2017
Posts: 499
Z
Zheka Offline
Senior Member
Zheka  Offline
Senior Member
Z

Joined: Jul 2017
Posts: 499
2 more issues:
Code
function stp(var entStp, var entT) {
	
	print(TO_LOG,"\n in tmf: %s, high = %.5f, close = %.5f", strdate(HMS,wdate(0) ), priceHigh(0), priceClose(0) ); 
 
        watch("#entT=",strdate(HMS,entT));
 
       return 4; //or 0  
}

function run()
{
	set(LOGFILE, TICKS);
		   
	Verbose = 3;
	
	Spread=Slippage = 0;
	
	BarPeriod = 60; 
		
	StartDate = 2020; 
	EndDate   = 2020;		
			
watch("#wdate=",strdate(HMS,wdate(0)));	

	enterLong(stp,10*PIP,wdate(0));		
} 
logs this:
Quote
[80: Tue 20-01-07 19:00c] 1.11425/1.11497\1.11413/1.11435 -0.0
wdate= 19:00:00
[EUR/USD::L08001] Long 1@1.11435 x at 19:00:00

in tmf: 19:01:00, high = 1.11442, close = 1.11440
entT= 19:01:52
in tmf: 19:02:00, high = 1.11443, close = 1.11428
entT= 19:01:52
1) Why would Zorro enter any trade at all?

2) Time passed as a parameter to the tmf becomes some 2 min ahead inside the tmf!??? --see in red

Re: New Zorro version 2.30 [Re: jcl] #481072
08/05/20 10:34
08/05/20 10:34
Joined: Jul 2017
Posts: 499
Z
Zheka Offline
Senior Member
Zheka  Offline
Senior Member
Z

Joined: Jul 2017
Posts: 499
I accidentally deleted LifeTime=1 from the code above; the log is correct.

Page 5 of 10 1 2 3 4 5 6 7 9 10

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