Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by M_D. 04/26/24 20:22
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (M_D, AndrewAMD, Quad, Ayumi), 806 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Binary Options Bugs [Re: jcl] #462917
11/04/16 15:50
11/04/16 15:50
Joined: Aug 2016
Posts: 95
Wien
T
trenki2 Offline OP
Junior Member
trenki2  Offline OP
Junior Member
T

Joined: Aug 2016
Posts: 95
Wien
Ok, I have run the version from the financial hacker blog and also the last one posted here where the WinPayout and LossPayout variables are set inside the loop.

I did set(LOGFILE) so that log files are beeing produced.

I have uploaded the full log files here: Log.zip

I have compared the train logs. They are identical. I have compared a few generated parameter files. They are identical.

I made a file compare with the Windows utility program FC file1 file2 between the test logs as they are different and attached the result to this post.

The working test log has a filesize of 17 287 150 bytes while the buggy version log file has a size of 17 096 468 bytes.

There are a lot of price differences like so:

Code:
***** BinaryBugtest.log
[98749: Tue 08.05.12 20:35] (1.30068)
[EUR/USD::L4901] Long 1@1.30064  at 20:35:00

***** BINARYWORKINGTEST.LOG
[98749: Tue 08.05.12 20:35] (1.30068)
[EUR/USD::L4901] Long 1@1.30063  at 20:35:00

*****

***** BinaryBugtest.log
[98750: Tue 08.05.12 20:40] +0 +1 1/0  (1.30064)
[EUR/USD::L4901] Sell 1@1.30063: -1.00 at 20:40:00

***** BINARYWORKINGTEST.LOG
[98750: Tue 08.05.12 20:40] +0 +1 1/0  (1.30064)
[EUR/USD::L4901] Sell 1@1.30059: -1.00 at 20:40:00



And maybe some other differences but there were too many of them so the tool did not show all of them.

Attached Files
diff.txt (2 downloads)
Re: Binary Options Bugs [Re: trenki2] #462919
11/04/16 17:15
11/04/16 17:15
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Ok, obviously the entry and exit prices in your logs don't match. This explains the problem. Correct are only the prices in your "BINARYWORKINGTEST.LOG" version. That's the prices that I get.

The next question is how you got the wrong prices? Is it the same historical data in both cases? And have you really set the spread to zero?

Re: Binary Options Bugs [Re: jcl] #462921
11/04/16 17:37
11/04/16 17:37
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 use the same data in both cases! The training run seems to not be affected as the training log files are the same, only when testing the strategy there are differences.

I have tested the script from my last post and I also tried whether setting Spread = 0 inside and outside of the while loop would make any difference but it does not.

Re: Binary Options Bugs [Re: trenki2] #462934
11/07/16 09:30
11/07/16 09:30
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Hmm, I would normally give up at this point and forward you to Zorro support, who are specialized in finding out what your script is doing. But a last attempt: Can you post here the complete script that enters at wrong prices?

Re: Binary Options Bugs [Re: jcl] #462939
11/07/16 16:28
11/07/16 16:28
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 basically have posted the script already above but here it is again:

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


function run()
{
	set(LOGFILE);
	
	BarPeriod = 5;
	LookBack = 100;
	NumWFOCycles = 20;
	NumCores = -1;
	
	set(BINARY);
	set(PARAMETERS);
	int TimePeriod = optimize(20,10,100);
	var Threshold = 0.01*(HH(TimePeriod)-LL(TimePeriod));

	while (asset(loop("EUR/USD")))
	{
		WinPayout = 75;
		LossPayout = 0;
		//Spread = 0;
		
		if(NumOpenLong+NumOpenShort == 0) 
		{
			LifeTime = 1;
			if(HH(TimePeriod) - priceClose() < Threshold)
				enterShort();
			else if(priceClose() - LL(TimePeriod) < Threshold)
				enterLong();
		}
	}
}



You can also uncomment the line with the Spread = 0 but the result is the same:

Code:
Walk-Forward Test: BinaryBug EUR/USD 2011..2016
[...]
Profit -5$  MI -0$  DD 16$  Capital 23$
Trades 493  Win 56.6%  Avg -0.1p  Bars 1
AR -5%  PF 0.98  SR -0.10  UI 74%  R2 0.00


Re: Binary Options Bugs [Re: trenki2] #462952
11/08/16 12:21
11/08/16 12:21
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Spread or not makes a HUGE difference, in fact I get the same wrong prices above when I run that script. You must set spread to zero for binary portfolio trading, and also commission:

Spread = Commission = 0;

Train again afterwards. Just commenting-in the line is not enough when you still trained with the wrong script.

Re: Binary Options Bugs [Re: jcl] #462959
11/08/16 14:24
11/08/16 14:24
Joined: Aug 2016
Posts: 95
Wien
T
trenki2 Offline OP
Junior Member
trenki2  Offline OP
Junior Member
T

Joined: Aug 2016
Posts: 95
Wien
Its interesting that you now also get the wrong results. I posted that same script earlier and then you said you got the right results! So it seems you are not getting the same results every time?

And Spread and Commission does NOT MAKE ANY difference for me. I have trained and tested with both!!! Like so:

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


function run()
{
	set(LOGFILE);
	
	BarPeriod = 5;
	LookBack = 100;
	NumWFOCycles = 20;
	NumCores = -1;
	
	set(BINARY);
	set(PARAMETERS);
	int TimePeriod = optimize(20,10,100);
	var Threshold = 0.01*(HH(TimePeriod)-LL(TimePeriod));

	while (asset(loop("EUR/USD")))
	{
		WinPayout = 75;
		LossPayout = 0;
		Spread = Commission = 0;
		
		if(NumOpenLong+NumOpenShort == 0) 
		{
			LifeTime = 1;
			if(HH(TimePeriod) - priceClose() < Threshold)
				enterShort();
			else if(priceClose() - LL(TimePeriod) < Threshold)
				enterLong();
		}
	}
}



I get the wrong results as I already posted!

Could you post the full script with a working asset loop that produces the correct results for you?

Last edited by trenki2; 11/08/16 15:16.
Re: Binary Options Bugs [Re: trenki2] #462979
11/09/16 14:20
11/09/16 14:20
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I get the wrong results with the wrong script and the right results with the right script. Here is it:

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


function run()
{
	assetList("AssetsFix.csv");
	set(PARAMETERS|LOGFILE|TESTNOW);
	BarPeriod = 5;
	LookBack = 100;
	NumWFOCycles = 20;
	NumCores = -2;
	PlotHeight1 = 340;
	PlotWidth = 800;
	
	set(BINARY);
	
while (asset(loop("EUR/USD")))
{	
	WinPayout = 75;
	LossPayout = 0;
	Spread = Commission = 0;
	LifeTime = 1;
	int TimePeriod = optimize(20,10,100);
	var Threshold = 0.01*(HH(TimePeriod)-LL(TimePeriod));

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


Re: Binary Options Bugs [Re: jcl] #462983
11/09/16 17:08
11/09/16 17:08
Joined: Aug 2016
Posts: 95
Wien
T
trenki2 Offline OP
Junior Member
trenki2  Offline OP
Junior Member
T

Joined: Aug 2016
Posts: 95
Wien
Just tested it. Copy pasted it into a new script, hit train and let it run.

Got the WRONG RESULTS:

Code:
Parameters stored in Test5_19.par

Run Test5..
Assets..
Walk-Forward Test: Test5 portfolio 2011..2016
Account AssetsFix.csv 
Read Test5_1.par Test5_2.par Test5_3.par Test5_4.par Test5_5.par Test5_6.par Test5_7.par Test5_8.par Test5_9.par Test5_10.par Test5_11.par Test5_12.par Test5_13.par Test5_14.par Test5_15.par Test5_16.par Test5_17.par Test5_18.par Test5_19.par
Profit -5$  MI -0$  DD 16$  Capital 23$
Trades 493  Win 56.6%  Avg -0.1p  Bars 1
AR -5%  PF 0.98  SR -0.10  UI 74%  R2 0.00
Time 00:02:15



I don't know how you can get the right results then, but I think I will have to go to zorro support then.

If you want I can upload you a VirtualBox Image with a freshly installed Zorro that shows the problematic behaviour!

Last edited by trenki2; 11/09/16 20:30.
Re: Binary Options Bugs [Re: trenki2] #463461
12/05/16 10:34
12/05/16 10:34
Joined: Aug 2016
Posts: 95
Wien
T
trenki2 Offline OP
Junior Member
trenki2  Offline OP
Junior Member
T

Joined: Aug 2016
Posts: 95
Wien
The support suggested to always set the EXTRADATA flag and Slippage = 0. When I do this I get the same result for both scripts. But now the strategy is not really profitable any more.

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