Hi Tomasz,
Thank you for your reply. I do agree with your comments. My initial thought was if I want to do what you suggest to Optimize only one variable, could it be done be making the the call to Optimize each variable sequentially as in the below code but now see the problem. Even if i Optimize one variable and then move to the next variable, the value I first optimized will not be saved so the final results would be inaccurate. As usual you are correct. I guess I need to create 4 strategies and then composite then for a single score.
Thank you,
Mike
OptimizerSetEngine("trib");
OptimizerSetOption("Runs", 3 );
OptimizerSetOption("MaxEval", 200 );
weight1 =optimize("Weight1",0.0,-1.5,1.5,0.01);
weight2 =optimize("Weight2",0.0,-1.5,1.5,0.01);
weight3 =optimize("Weight3",0.0,-1.5,1.5,0.01);
weight4 =optimize("Weight4",0.0,-1.5,1.5,0.01);
@ES#C_60_COMP_60_1 =mROC("@RTY#C_60","CC1" )*weight1;
@ES#C_60_COMP_60_2 =mROC("@TY#C_60","CC1" )*weight2;
@ES#C_60_COMP_60_3 =mROC("@ES#C_60","CC1" )*weight3;
@ES#C_60_COMP_60_4 =mROC("@NQ#C_60","CC1" )*weight4;
@ES#C_60_COMP_60_5= IIf(@ES#C_60_COMP_60_1>=0.01,1,IIf(@ES#C_60_COMP_60_1<=-0.01,-1,0));
@ES#C_60_COMP_60_6= IIf(@ES#C_60_COMP_60_2>=0.01,1,IIf(@ES#C_60_COMP_60_2<=-0.01,-1,0));
@ES#C_60_COMP_60_7= IIf(@ES#C_60_COMP_60_3>=0.01,1,IIf(@ES#C_60_COMP_60_3<=-0.01,-1,0));
@ES#C_60_COMP_60_8= IIf(@ES#C_60_COMP_60_4>=0.01,1,IIf(@ES#C_60_COMP_60_4<=-0.01,-1,0));
@ES#C_60_COMP_60_10 =@ES#C_60_COMP_60_5+@ES#C_60_COMP_60_6+@ES#C_60_COMP_60_7+@ES#C_60_COMP_60_8;