Download MetaTrader 5

Access to Optimization Inputs

To add comments, please log in or register
Arturo Schreiber
33
Arturo Schreiber  

I'm running something like this on my Expert Advisor:

 

double OnTester()

  {

   double sid = TesterStatistics(STAT_INITIAL_DEPOSIT);

   double sp = TesterStatistics(STAT_PROFIT); 

   FileWrite(fH, totest, sp);

 

I'd like to add a variable with the pass inputs, but I can't find the class or method that points to current inputs. 

Carl Schreiber
6788
Carl Schreiber  
You can write a file and read it..
Arturo Schreiber
33
Arturo Schreiber  

 I created an image to help you understand me.

 

I already wrote a file (thanks for that). And I can do it with all the data on the green circle. But I need to access to the red circle, I haven't find whats the object or variable in MQL4 that contains those inputs.

I read that in MQL5 there is ParameterGetRange(), But not on MQL4. Is there any way to obtain the values of the red circle PROGRAMATICALLY, not clicking save? 

Carl Schreiber
6788
Carl Schreiber  

In the red circle you find the setup of your extern-variables like:

extern int StopLoss   = 277;

Just write them too into your file!

Arturo Schreiber
33
Arturo Schreiber  
gooly:

In the red circle you find the setup of your extern-variables like:

Just write them too into your file!

Thanks!.  

If anyone gets here this is what works: 

 

int totest;

totest = StopLoss;

int totest2;

totest2 = TakeProfit;  

To add comments, please log in or register