AdviseLong Export Assets

Posted By: riinvest

AdviseLong Export Assets - 04/28/19 13:09

Hi,
I am trying to export data of two assets with the AdviseLong function. Is there any way that the data is stored in two seperated csv files? Alternatively, I was thinking to define the data one of the export arrays (see exportarr[0]) by defining a counter. However, this does not seem to work either.



function run()
{

EndDate = 2017; // start two years ago
BarPeriod = 60; // use 1-hour bars
LookBack = 500; // needed for scale()
set(RULES); // generate signals

LifeTime = 10; // prediction horizon

Spread = RollLong = RollShort = Commission = Slippage = 0;

int b = 1;

while(asset(loop("EUR/USD","AUD/USD"))){


//Pre calculate indicators
//Define prices
vars Price = series(price());
vars PriceOpen = series(priceOpen());
vars PriceClose = series(priceClose());
vars PriceHigh = series(priceHigh());
vars PriceLow = series(priceLow());
vars Trend50 = series(LowPass(Price,50));
vars Trend200 = series(LowPass(Price,200));
vars Trend500 = series(LowPass(Price,500));


b=b+1;
printf("%i", b);

//Export function

//output array
var exportarr[10];
exportarr[0]= (var) b; //scale(change(1),498)/100;
exportarr[1]= scale((Trend50[0]/PriceClose[0]-1)*100,498)/100;
exportarr[2]= scale((Trend200[0]/PriceClose[0]-1)*100,498)/100;
exportarr[3]= scale((Trend500[0]/PriceClose[0]-1)*100,498)/100;
exportarr[4]= scale((rRealUpperBand/PriceClose[0]-1)*100,498)/100;
exportarr[5]= scale((rRealLowerBand/PriceClose[0]-1)*100,498)/100;
exportarr[6]= scale((MMI_Smooth[0]/MMI_Smooth[1]-1)*100,498)/100;
exportarr[7]= scale((Trend50[0]/PriceClose[0]-1)*100,498)/100;
exportarr[8]= scale((Trend200[0]/PriceClose[0]-1)*100,498)/100;
exportarr[9]= scale((Trend500[0]/PriceClose[0]-1)*100,498)/100;

adviseLong(SIGNALS+BALANCED,0, exportarr, 10);

enterLong();

b = b+1;
}
}
Posted By: jcl

Re: AdviseLong Export Assets - 04/29/19 08:30

That's right, the csv file always has the same name regardless of the asset. We'll change that in the next update so that any asset exports to an individual signals file. Until then, train them separately.
Posted By: riinvest

Re: AdviseLong Export Assets - 04/29/19 17:14

Thank you for your answer, looking for the next release then
© 2024 lite-C Forums