1) Seqential optimization is not performed i.e. for each strategy. Instead sort of combitional optimization between two strategies is done even those strategies are separate (see setup screen). Using strategy with two symbols gives also messed optimization results.
2) Custom fitness value is set inproperly - always last value is used even print from EL code gives two symbols
Code: Select all
Inputs: RSILength(14);
Vars: oResult1(0), ObLevel(0.8), OsLevel(-0.8), Price(0), Price1(0, Data1);// Price2(0, Data2);
Var: name(""), cf_val(0);
Price = Close;
if CurrentBar = 1 then begin
name = getsymbolname;
if name = "AUDJPY" then cf_val = 1;
if name = "USDJPY" then cf_val = 2;
SetCustomFitnessValue(cf_val);
print(name);
end;
oResult1 = JohnEhler_My_RSI( RSILength, Price );
if oResult1 crosses under 0 then
SellShort("0crossSell") next bar at Market
else if oResult1 crosses over 0 then
Buy("0crossBuy") next bar at Market ;
if oResult1 crosses under ObLevel then
SellShort("ObCross") next bar at Market
else if oResult1 crosses over OsLevel then
Buy("OsCross") next bar at Market;