|
Incorrect file name when using advise with SIGNALS
#473401
07/03/18 06:50
07/03/18 06:50
|
Joined: Feb 2017
Posts: 369
Dalla
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2017
Posts: 369
|
I'm using Zorro 1.84.9 Given the following asset file
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
#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
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.
|
|
|
|