Optimize var multiAsset

Posted By: sdelatorre

Optimize var multiAsset - 12/26/18 23:24


Hello,

I would want optimize var " SESSIONSTART6" for all assets not for Asset selected in scrollbox

Any idea? Can I do ?

When I push TRAIN the code only does a loop for all assets but shows the optimize var for the asset in the scrollbox.



int timezone6 = AEST;
int sessionStart6 = 8;
int sessionEnd6 = 14;


int profit(){
if(TradeIsOpen and (TradeProfit/TradeUnits/PIP < -50)){exitTrade();}
return 0;
}


function run() {
set(PLOTNOW+PARAMETERS);
BarPeriod = 60;

var Arranca=optimize(6,1,11,1);
sessionStart6=Arranca;


string Name;
while(Name = (loop(Assets))){

if(lhour(timezone6) == sessionStart6 ) { enterShort(profit); }
if(lhour(timezone6) == sessionEnd6) { exitShort();
}

}


Thanks in advance
Posted By: jcl

Re: Optimize var multiAsset - 12/27/18 09:37

You must select an asset for trading it, and you must optimize parameters after selecting the asset, not before.
Posted By: sdelatorre

Re: Optimize var multiAsset - 12/27/18 22:16


Thanks but I want optimize all assets. Can I do it ?

I have to select one to one ?



and another question ...and I don't know what is the asset that I will trade ? what can I do ? how I could optimize it ?
Posted By: jcl

Re: Optimize var multiAsset - 12/28/18 09:23

Look in workshop 6, there you can see how it's done. The name of the currently selected asset is in the Asset string.
© 2024 lite-C Forums