Best way to do a visual comparison between two EA's

 

I'm running two similar EA's on the same symbol in a demo account to compare the behavior between them.

But it is very difficult to understand the visual comparison because the MT5 join the indications of trade of both EA's in the symbol graph.


Someone know how to make a visual comparison easier?

 
Rafael Caetano Pinto:

I'm running two similar EA's on the same symbol in a demo account to compare the behavior between them.

But it is very difficult to understand the visual comparison because the MT5 join the indications of trade of both EA's in the symbol graph.


Someone know how to make a visual comparison easier?

2 accounts, same spec, same broker, same EA with 2 vps, you'll be amazed to know that there's still differences :) - amazing, isn't it ? 

 
Icham Aidibe:

2 accounts, same spec, same broker, same EA with 2 vps, you'll be amazed to know that there's still differences :) - amazing, isn't it ? 

2 accounts is not a option to me because there is network and throughput differences that will be affect the comparison.


I just implemented an indicator to remove all arrows and trendlines that is not generated by EA trades. But the code isn't optimized (the MT5 is freezing when I use it to more than 2 charts):


//+------------------------------------------------------------------+
//|                                      ExpertTradeVisualFilter.mq5 |
//|                        Copyright 2018, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_plots   1
//--- plot p1
#property indicator_label1  "p1"
#property indicator_type1   DRAW_LINE
#property indicator_style1  STYLE_SOLID
#property indicator_width1  1
//--- indicator buffers
double         p1Buffer[];


input ulong MagicNumber; //Magic number

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit(){
//--- indicator buffers mapping
   SetIndexBuffer(0,p1Buffer,INDICATOR_DATA);
   
   if(MagicNumber == 0) return INIT_FAILED;

   ClearChart(DateOfDay(TimeCurrent()));
   
   return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[]){
//---
   int initial=prev_calculated;
   if(initial==0) initial = rates_total-1;
   else initial = prev_calculated-1;
   
   for(int i=initial;i<rates_total && !IsStopped();i++){
      ClearChart(time[i]);
   }

   return(rates_total);
}
//+------------------------------------------------------------------+

datetime TimeOfDay(datetime date){
   return date % 86400;
};

datetime DateOfDay(datetime date){
      return date - TimeOfDay(date);
};

void ClearChart(datetime initialTime){
   ulong          tickets[];

   if(HistorySelect(initialTime, TimeCurrent())){
      for(int i=0; i< HistoryDealsTotal(); i++){
         ulong dealTicket = HistoryDealGetTicket(i);
         if(
            MagicNumber != HistoryDealGetInteger(dealTicket, DEAL_MAGIC) &&
            _Symbol == HistoryDealGetString(dealTicket, DEAL_SYMBOL)
         ){
            int size = ArraySize(tickets);
            ArrayResize(tickets, size+1);
            tickets[size] = dealTicket;
         }
      }
   }
   
   int ticketTotal = ArraySize(tickets);
   if(ticketTotal == 0) return;

   int total = ObjectsTotal(0);
   for(int i=0; i<total; i++){
      string name = ObjectName(0, i);
      
      for(int j=0; j<ticketTotal; j++){
         if(StringFind(name, "#"+IntegerToString(tickets[j])) > -1){
            ObjectDelete(0, name);
         }
      }
   }
}
Reason: