Download MetaTrader 5

Is it possible to calculate last 1 month return on OnTester function.

To add comments, please log in or register
rigorism
314
rigorism  
Please tell me the code.
Alain Verleyen
Moderator
33332
Alain Verleyen  
What have you tried ?
rigorism
314
rigorism  

I think that OnTester function apply whole of back test period ,for example from 11/1/2011 to 11/1/2016.

But I want to know both whole result and specific period result, like from 10/1/2016 to 11/1/2016.

So is there something argument to specify the period in OnTester function.

 

double OnTester()

{

double ret = 0.0;

double ret = TesterStatistics(STAT_PROFIT);  ← It will show whole back test period's profit but I want to know last 1 month profit.

return(ret);

Alain Verleyen
Moderator
33332
Alain Verleyen  
rigorism:

I think that OnTester function apply whole of back test period ,for example from 11/1/2011 to 11/1/2016.

But I want to know both whole result and specific period result, like from 10/1/2016 to 11/1/2016.

So is there something argument to specify the period in OnTester function.

 

double OnTester()

{

double ret = 0.0;

double ret = TesterStatistics(STAT_PROFIT);  ← It will show whole back test period's profit but I want to know last 1 month profit.

return(ret);

Yes you have to calculate it, see the link provided by WHRoeder.
rigorism
314
rigorism  
Alain Verleyen:
Yes you have to calculate it, see the link provided by WHRoeder.

Dear Alain Varleyen

OK. Thank you for your answer. 

To add comments, please log in or register