Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 559 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
AdviseLong Export Assets #476959
04/28/19 13:09
04/28/19 13:09
Joined: Apr 2019
Posts: 5
R
riinvest Offline OP
Newbie
riinvest  Offline OP
Newbie
R

Joined: Apr 2019
Posts: 5
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;
}
}

Re: AdviseLong Export Assets [Re: riinvest] #476966
04/29/19 08:30
04/29/19 08:30
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
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.

Re: AdviseLong Export Assets [Re: jcl] #476976
04/29/19 17:14
04/29/19 17:14
Joined: Apr 2019
Posts: 5
R
riinvest Offline OP
Newbie
riinvest  Offline OP
Newbie
R

Joined: Apr 2019
Posts: 5
Thank you for your answer, looking for the next release then

Last edited by riinvest; 04/29/19 17:15.

Moderated by  Petra 

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

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

Powered by UBB.threads™ PHP Forum Software 7.7.1