Train not save

Posted By: Grat

Train not save - 05/25/20 05:53

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 picture Snímek obrazovky 2020-05-25 v 10.55.47.png
Posted By: jcl

Re: Train not save - 05/25/20 12:04

"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.
Posted By: Grat

Re: Train not save - 05/25/20 18:36

Ok, but see the picture:

Rules stored in Test1.c
Posted By: danatrader

Re: Train not save - 05/27/20 04:15

Try to see if the file Test1.c exists.
Rename it to Test1.fac, see if it runs, if yes, file Bug.
Posted By: Grat

Re: Train not save - 05/28/20 06:09

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
Posted By: Petra

Re: Train not save - 05/29/20 09:49

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.
© 2024 lite-C Forums