Gamestudio Links
Zorro Links
Newest Posts
New Zorro version 1.83
by jcl
Today at 16:24
Unfreed in -diag
by 3run
Today at 10:30
About STRING* and char
by 20BN
Today at 09:40
I need help
by evangelos
Today at 02:37
Draw stuff from other thread
by Superku
Yesterday at 22:00
Optimize Stop with multi Asset strategy
by Dalla
Yesterday at 21:48
cloth ?
by 3run
Yesterday at 20:48
AUM Magazine
Latest Screens
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Forgotten Tales - Demo version
RPG PARTY
Who's Online
16 registered (easyX, 3run, AndrewAMD, alibaba, FirasTaji, jenGs, 5 invisible), 492 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
FirasTaji, zentrader, Fenry, DJ_Algo, tang
18005 Registered Users
Topic Options
Rate This Topic
#473401 - 07/03/18 08:50 Incorrect file name when using advise with SIGNALS
Dalla Offline
Member

Registered: 02/24/17
Posts: 268
I'm using Zorro 1.84.9
Given the following asset file

Code:
Name,Price,Spread,RollLong,RollShort,PIP,PIPCost,MarginCost,Leverage,LotAmount,Commission,Symbol,Type
ABB.ST,50,0.1,0,0,0.01,0.01,0,2,1,0.02,AV:ABB
ALFA.ST,50,0.1,0,0,0.01,0.01,0,2,1,0.02,AV:ALFA.ST
CAST.ST,50,0.1,0,0,0.01,0.01,0,2,1,0.02,AV:CAST.ST



and the following script named Debug.c
Code:
#include <r.h>

function run()
{
	assetList("AssetsLargeCap.csv");
	set(RULES);
	BarPeriod = 1440;
	LookBack = 200;
	LifeTime = 1;
	Spread = Commission = Slippage = RollLong = RollShort = 0;
	
	int period = 50; //lookback for calculating normalized/standardized values

	while(asset(loop("ABB.ST","ALFA.ST","CAST.ST"))) {
		vars price = series(price());
		vars vol = series(marketVol());
		vars pv = series(vol[0]*price[0]);
	
		//Normalized
		vars priceNorm = series(Normalize(price,period));
		vars volNorm = series(Normalize(vol,period));
		vars pvNorm = series(Normalize(pv,period));
	
		if(Train) {
			adviseLong(SIGNALS+BALANCED, 0, priceNorm[0], volNorm[0],pvNorm[0]);
			enterLong();
		}
	}
}



when training I get the following output in the message window

Code:
Debug compiling..............
Rules: Debug  2013..2018
Assets AssetsLargeCap.csv
Train ABBST_L Debug.csv.
Train ALFAST_L Debug.csv.
Train CASTST_L Debug.csv



When checking in the Data folder, I find a single file, named Debug.csv which only contains output from a single asset.

I guess there should be one file for each asset? Bug?

Also a question: Is it possible to somehow generate a single file containing signals from all specified assets. The use case would be that I ultimately don't want a separate model for each asset, but rather a general model trained on data from many assets.

Top
#473441 - 07/06/18 16:15 Re: Incorrect file name when using advise with SIGNALS [Re: Dalla]
jcl Online

Chief Engineer

Registered: 07/22/00
Posts: 26402
Loc: Frankfurt
When you use loop(), all assets are separately trained and the signals file is thus rewritten for any asset. For training them all together, don't use a loop() call, but a normal for() or while() loop.

Top
#473453 - 07/09/18 13:22 Re: Incorrect file name when using advise with SIGNALS [Re: jcl]
Dalla Offline
Member

Registered: 02/24/17
Posts: 268
Can I somehow train one model per asset, without running separate strategies?

Top
#473464 - 07/10/18 15:12 Re: Incorrect file name when using advise with SIGNALS [Re: Dalla]
jcl Online

Chief Engineer

Registered: 07/22/00
Posts: 26402
Loc: Frankfurt
That's what your code above already does.

Top
#473471 - 07/11/18 08:06 Re: Incorrect file name when using advise with SIGNALS [Re: jcl]
Dalla Offline
Member

Registered: 02/24/17
Posts: 268
No, that's what I'm saying.
The above script gives me a single output file, Debug.csv.

I was expecting one file per asset, named something like this
ABBST_L_Debug.csv.
ALFAST_L_Debug.csv.
CASTST_L_Debug.csv

Top
#473484 - 07/13/18 11:38 Re: Incorrect file name when using advise with SIGNALS [Re: Dalla]
jcl Online

Chief Engineer

Registered: 07/22/00
Posts: 26402
Loc: Frankfurt
Ok, the probably simplest way is file_copy() in any INITRUN to copy the Debug.csv from the previous training loop to a target file name. Or use an individual neural() function that stores the signals.

Top



Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de