Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (7th_zorro, degenerate_762, AndrewAMD, ozgur), 774 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
EXTRADATA Issues #463282
11/26/16 11:49
11/26/16 11:49
Joined: Aug 2016
Posts: 95
Wien
T
trenki2 Offline OP
Junior Member
trenki2  Offline OP
Junior Member
T

Joined: Aug 2016
Posts: 95
Wien
I tried out the EXTRADATA flag after reading the comments on this forum about it giving a more accurate simulation of open and close prices.

Unfortunately I could not find any documentation about this flag on the mode flags page (Mode Flags Documentation).

I first trained and tested the binary options code from the financial hacker block with Zorro S 1.50.6 and the history from the Zorro homepage on the EUR/USD pair:

Code:
var objective()
{
	return ((var)(NumWinLong+NumWinShort))/(NumLossLong+NumLossShort);
}


function run()
{
	//set(EXTRADATA);
	
	BarPeriod = 5;
	LookBack = 100;
	NumWFOCycles = 20;
	NumCores = -1;
	
	set(BINARY);
	WinPayout = 75;
	LossPayout = 0;

	set(PARAMETERS);
	int TimePeriod = optimize(20,10,100);
	var Threshold = 0.01*(HH(TimePeriod)-LL(TimePeriod));

	if(NumOpenLong+NumOpenShort == 0) 
	{
		LifeTime = 1;
		if(HH(TimePeriod) - priceClose() < Threshold)
			enterShort();
		else if(priceClose() - LL(TimePeriod) < Threshold)
			enterLong();
	}
}



It gives this result:
Code:
Monte Carlo Analysis... Median AR 41%
Profit 37$  MI 1$  DD 8$  Capital 17$
Trades 493  Win 61.5%  Avg +0.9p  Bars 1
AR 50%  PF 1.20  SR 0.69  UI 8%  R2 0.90



Now I uncommented the set(EXTRADATA) line and trained and tested again:

It gives now this extraordinary result:

Code:
Monte Carlo Analysis... Median AR 658%
Profit 700$  MI 13$  DD 15$  Capital 22$
Trades 4737  Win 65.6%  Avg +1.7p  Bars 1
AR 712%  PF 1.43  SR 4.54  UI 1%  R2 0.98





I have now a SR of 4.54 and suddenly 4737 trades instead of just 493!!!

Now I don't think that can be quite right. It just looks too good. Why would the number of trades change just because of this flag?

Which numbers am I supposed to trust now? What does the EXTRADATA flag really do?

Re: EXTRADATA Issues [Re: trenki2] #463283
11/26/16 15:20
11/26/16 15:20
Joined: Feb 2014
Posts: 73
Montreal, Qc Canada
F
Finstratech Offline
Junior Member
Finstratech  Offline
Junior Member
F

Joined: Feb 2014
Posts: 73
Montreal, Qc Canada
Search EXTRADATA in the Help HTML document located in the main zorro folder. You will find your answers there. Well some of them.

Re: EXTRADATA Issues [Re: Finstratech] #463297
11/26/16 22:53
11/26/16 22:53
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
EXTRADATA is already end of life and not part of the next version 1.52 anymore. It was a trial to approximate open and close prices of a bar period through (high+low)/2 of the first and the last bar to enhance the speed of the backtest but with remarkable drawbacks of the strategies' performances. See also on What's New:

Quote:
Zorro 1.52 new features (in development)
...
The EXTRADATA flag of version 1.50 was replaced by the LEAN flag that has the opposite meaning. Historical data is now stored in noncompressed format by default.


Or in short words: use EXTRADATA always to receive accurate results.

Re: EXTRADATA Issues [Re: Sphin] #463318
11/28/16 07:10
11/28/16 07:10
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
It is not always needed, but in more situations than we thought, like with short term scalping. That's why it will be removed in the next version. When you use it, also set Slippage to 0 or a negative value, since that's the situations where the slippage simulation bug can also affect the result.



Re: EXTRADATA Issues [Re: jcl] #463319
11/28/16 07:53
11/28/16 07:53
Joined: Aug 2016
Posts: 95
Wien
T
trenki2 Offline OP
Junior Member
trenki2  Offline OP
Junior Member
T

Joined: Aug 2016
Posts: 95
Wien
Thanks for the hint about Slippage. When i set Slippage = 0 i get a completely different result. Now the strategy is not profitable:

Code:
Monte Carlo Analysis... Median AR 4%
Profit 7$  MI 0$  DD 93$  Capital 87$
Trades 4737  Win 57.2%  Avg +0.0p  Bars 1
AR 2%  PF 1.00  SR 0.05  UI 46%  R2 0.00



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