Indicators: TradeStatisticsPanel - page 3

 
avoitenko:

Or do you need it to display intermediate values?

Well, yes. Then you can make graphs.

I think that the class should be developed in the direction of possibilities to get whatever your soul desires.

That's why I recommend to have not one sausage in the form of Calculation, but to break it into intermediate API functions with external parameters and obtaining the result.

For example, the function of calculating SharpeRatio(double &HPR[], double ahpr) - a pre-calculated array of HPR and ahpr is passed in

CountHPR(double &balance_data[], double &HPR[]) - calculate the HPR array - the balance_data array is passed in

etc.

 
Yeah. Then you can graph it. <br/ translate="no">

Then I propose to start from the end.

Create an indicator to display one statistical indicator in the form of a line on history, with a choice from the list: profit factor, balance, etc.

And modify the class for it. So at least the final goal is clear.

 

Forum on trading, automated trading systems and testing trading strategies

Indicators: TradeStatisticsPanel

Rosh, 2012.09.14 08:19

You can write an article on the same topic for MQL5. Especially since there are much more possibilities for creating reports.

was there an article?

I was just about to write something of my own on this topic, I will study other people's stuff and modify it to suit me, I need to work on currencies and magik, there is something to work on )))

thanks to the author for his work!

 

int try=0;

   bool res=HistorySelect(time_start,time_end);

   if(!res && try<NUMBER_OF_TRY_GET_HISTORY)

     {

      Sleep(100);

      res=HistorySelect(time_start,time_end);

      try++;

     }

   if(!res){

        m_err_msg="Unable to get the trade history"; 

        return(false);

   }

Where is the loop where everything is looped to NUMBER_OF_TRY_GET_HISTORY?

class CTradeStatistics

 

thejobber:

and where is the loop where everything is looped to NUMBER_OF_TRY_GET_HISTORY?

Thank you for finding the error. Obviously, the while operator should be used instead of the if operator.
 
Please do you have the mt4 version.
 
Wow, really awesome ! Thanks a lot.
 
how do i restrict results based on MAGIC NUMBER of an expert advisor if i want stats on my robot's performance on account?