Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
Deeplearning Script
by wolfi. 02/26/24 12:46
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/22/24 16:22
AssetAdd() vs. modern asset list?
by jcl. 02/21/24 15:01
How many still using A8
by Aku_Aku. 02/20/24 12:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 521 guests, and 6 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
Train not save #480183
05/25/20 05:53
05/25/20 05:53
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
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,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
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: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
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: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
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: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
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