Sorry, jcl, I don't pick it up. Even if I cancel all B functions keeps without compiling. I put now the stop loss and target in front and paréntesis to separate. Is it now that the A functions for one Time Frame interfer with the A functions of the other TimeFrame?



function trenta()
{
Stop = optimize(30,20,200)*PIP;
TakeProfit = optimize(500,150,700)*PIP;
ExitTime = 25;
TimeFrame = 1;
{
vars A1 = series(priceHigh(2));
vars A2 = series(priceHigh(1));
vars A3 = series(price(0));
var percentage = 0.001;
var VlrH;

VlrH = A1[0] * percentage;

if (A1[0] < A2[0] and A3[0] < A1[0]-VlrH) enterLong();
if (A1[0] > A2[0] and A3[0] > A1[0]+VlrH) enterShort();
}
{
//vars B1 = series(priceLow(2));
//vars B2 = series(priceLow(1));
//vars B3 = series(price(0));
//var percentage = 0.001;
//var VlrL;

//VlrL = B1[0] * percentage;


//if (B1[0] < B2[0] and B3[0] < B1[0]-VlrL) enterLong();
//if (B1[0] > B2[0] and B3[0] > B1[0]+VlrL) enterShort();

}

}

function doscents()
{

Stop = optimize(30,20,200)*PIP;
TakeProfit = optimize(500,150,700)*PIP;
ExitTime = 10;
TimeFrame = 8;
{

vars A1 = series(priceHigh(2));
vars A2 = series(priceHigh(1));
vars A3 = series(price(0));
var percentage = 0.001;
var VlrH;

VlrH = A1[0] * percentage;

if (A1[0] < A2[0] and A3[0] < A1[0]-VlrH) enterLong();
if (A1[0] > A2[0] and A3[0] > A1[0]+VlrH) enterShort();
}

{
//vars B1 = series(priceLow(2));
//vars B2 = series(priceLow(1));
//vars B3 = series(price(0));
//var percentage = 0.001;
//var VlrL;

//VlrL = B1[0] * percentage;

//if (B1[0] < B2[0] and B3[0] < B1[0]-VlrL) enterLong();
//if (B1[0] > B2[0] and B3[0] > B1[0]+VlrL) enterShort();
}

}

function run()
{
set(PARAMETERS);
BarPeriod = 30;
StartDate = 2011;
EndDate = 2013;
function trenta();
function doscents();
NumWFOCycles = 3;
}


When training it gives:


A1,A2,A3 Multitime trialF compiling................
WFO: A1,A2,A3 Multitime trialF 2011..2013