Optimization not working while normal testing is working fine

 

Hi all, 

I am quite new with MQL5 and trying to optimize an EA I wrote. I have no trouble testing my strategy on a single pair but once I try to optimize the inputs or test it on multiple symbols, the test run but not a single trade is taken on any pass. Any one had a similar problem? 


input double addedToSL = 0.000150; 
input double RsiTsDiff0 = 1.0; 
input double RsiTsDiff1 = 0.5;
input double RsiTsDiff2 = 0.0;
input double RsiTsDiff3 = 0.8;
input double tpRR = 2.2; 

Here is how I declared my input and how I'm trying to test only the tpRR input to begin with.

Thanks for any help! 

 
Did you set the range of each parameter properly?
 
Ying Siang Ng #:
Did you set the range of each parameter properly?

I think so, all inputs are in the correct range. I don't get any error when running the test. I attach the picture of how I define them. Thanks 

Files:
inputs.jpg  45 kb
 
Raphael A #:

I think so, all inputs are in the correct range. I don't get any error when running the test. I attach the picture of how I define them. Thanks 

From you answer, I can tell you didn't get my question. You need to set optimisation parameters range  at your tester.

 
Ying Siang Ng #:

From you answer, I can tell you didn't get my question. You need to set optimisation parameters range  at your tester.

Ok thank you. Are you referring to ParameterSetRange() to be called within OnTesterInit() ?  
Documentation on MQL5: Event Handling / OnTesterInit
Documentation on MQL5: Event Handling / OnTesterInit
  • www.mql5.com
OnTesterInit - Event Handling - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Ying Siang Ng #:

From you answer, I can tell you didn't get my question. You need to set optimisation parameters range  at your tester.

I define the optimisation parameter as follow 

void OnTesterInit(){
   ParameterSetRange("addedToSL", true, 0.000150, 0.0, 0.00005, 0.0005);
   ParameterSetRange("TpRR", true, 1.0, 0.0, 0.1, 5.0);
   ParameterSetRange("RsiTsDiff0", true, 0.5, 0.0, 0.05, 1.0);
   ParameterSetRange("RsiTsDiff1", true, 0.5, 0.0, 0.05, 1.0);
   ParameterSetRange("RsiTsDiff3", true, 0.5, 0.0, 0.05, 1.0);
    
}

But what I do not understand is that even the optimization "All symbols selected in marketwatch" is not working, while this is unrelated to the input 

Reason: