Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, AndrewAMD), 877 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 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,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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