Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Quad, TipmyPip, degenerate_762, AndrewAMD, Nymphodora), 997 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 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,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
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: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
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 (155 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,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
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,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
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,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
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: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
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