Gamestudio Links
Zorro Links
Newest Posts
A9
by 3run. 07/08/20 18:44
Historical ticks for Lookback backfill
by Zheka. 07/08/20 09:10
Trade Mode without a broker
by jj02520024. 07/08/20 01:20
How to handle algo name in Simulate.c
by happysun. 07/07/20 08:56
Erasing a datapoint in a plot array
by jcl. 07/06/20 09:51
typo
by jcl. 07/06/20 09:44
Video Panel System
by Emre. 07/06/20 09:39
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
7 registered members (3run, Quad, FLD, deus777, Ayumi, jenGs, kvm), 424 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
TraderKevin, deus777, carolthesecond, Roger399, vrindger
18474 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Train not save #480183
05/25/20 05:53
05/25/20 05:53
Joined: May 2015
Posts: 267
Czech Republic
G
Grat Offline OP
Member
Grat  Offline OP
Member
G

Joined: May 2015
Posts: 267
Czech Republic
Hi,

I have this code:
Code
#include <profile.c>

function run()
{
	StartDate = 2010;
	EndDate = 2018;
	BarPeriod = 1440; // 1 day
	BarZone = WET; // Western European midnight
	Weekend = 1;	// don't merge Friday and Sunday bars
//	NumWFOCycles = 5;
	asset("EUR/USD");
	
	//set(RULES+TESTNOW);
	NumTrainCycles = 2;
	if(TrainCycle == 1) set(RULES);
	else if(TrainCycle == 2) set(PARAMETERS);
  	else if(TrainCycle == 0) set(RULES|PARAMETERS|FACTORS); 

	if(Train) Hedge = 2;	// for training, allow long + short	
	LifeTime = 3;  		// one week
	MaxLong = MaxShort = -1;

	int nTr=optimize(50,10,100); 

	if(adviseLong(PATTERN+FAST+2+RETURNS,0,
		priceHigh(2),priceLow(2),priceClose(2),
		priceHigh(1),priceLow(1),priceClose(1),
		priceHigh(1),priceLow(1),priceClose(1),
		priceHigh(0),priceLow(0),priceClose(0)) > nTr)
		enterLong();
	
	if(adviseShort() > nTr)
		enterShort();

	PlotWidth = 600;
	PlotHeight1 = 300;
	//plotTradeProfile(40);
	//plotWFOCycle(Equity,0);
	//plotWFOProfit();
}


after traingin:
Quote

Parameter 1 step 22: 74.00 => 3.59 155/78
Parameter 1 step 23: 81.40 => 3.89 134/65
Parameter 1 step 24: 89.54 => 4.51 114/50
Parameter 1 step 25: 98.50 => 4.63 94/40
Parameter 1 step 26: 100.00 => 4.63 94/40
Selected p1[24] = 89.9 => 4.31

EUR/USD: 89.9=> 5.408

Parameters stored in Test1.par


and if try test:
Quote


Parameters stored in Test1.par


Copied to Clipboard!

Test1 compiling...............
Read Test1.par
Test: Test1 EUR/USD 2010..2018
Assets Assets
Error 062: Can't open Test1.fac (rt:2)
Error 044: Data\Test1.fac not trained


I use this version:
Z Client S 2.26.6b
(c) oP group Germany 2020
Registered: xxxxxxx

Where I have a problem? In the older version is vorking

Attached Files Snímek obrazovky 2020-05-25 v 10.55.47.png
Last edited by Grat; 05/25/20 05:56.
Re: Train not save [Re: Grat] #480189
05/25/20 12:04
05/25/20 12:04
Joined: Jul 2000
Posts: 27,256
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,256
Frankfurt
"Can't open Test1.fac" means that it can't open Test1.fac.

A possible reason why a file cannot be opened is that it does not exist. Make sure to set FACTORS for training.

Re: Train not save [Re: Grat] #480192
05/25/20 18:36
05/25/20 18:36
Joined: May 2015
Posts: 267
Czech Republic
G
Grat Offline OP
Member
Grat  Offline OP
Member
G

Joined: May 2015
Posts: 267
Czech Republic
Ok, but see the picture:

Rules stored in Test1.c

Re: Train not save [Re: Grat] #480225
05/27/20 04:15
05/27/20 04:15
Joined: Mar 2019
Posts: 182
D
danatrader Offline
Member
danatrader  Offline
Member
D

Joined: Mar 2019
Posts: 182
Try to see if the file Test1.c exists.
Rename it to Test1.fac, see if it runs, if yes, file Bug.

Re: Train not save [Re: Grat] #480251
05/28/20 06:09
05/28/20 06:09
Joined: May 2015
Posts: 267
Czech Republic
G
Grat Offline OP
Member
Grat  Offline OP
Member
G

Joined: May 2015
Posts: 267
Czech Republic
So,

not working. After i remove parameter "FAST" and I try Train...


Test1 compiling................
Rules: Test1 2010..2018
Assets Assets
Train EURUSD_L 37 patterns
Train EURUSD_S 59 patterns
Rules stored in Test1.c

Error in 'line 19:
Syntax error: Wrong type ANDAND:DOUBLE:DOUBLE:LONG
< if(sig[4]<sig[5] && sig[5]<sig[1] && sig[1]<sig[2] && eq0(sig[2]-sig[3]) && sig[3]<sig[0] && sig[10]<sig[11] && sig[11]<sig[7] && sig[7]<sig[8] && sig[8]<sig[9] && sig[9]<sig[6]) >
Can't compile rules

Re: Train not save [Re: Grat] #480267
05/29/20 09:49
05/29/20 09:49
Joined: Apr 2008
Posts: 312
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 312
Austria
For pattern detection you must always use FAST, except when your rules are very simple and you want export them. And of course you must not rename .fac and .c files, or else you will get a lot wrong file errors.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1