How to find out if Copy Trading is applied

 
Dear all,

I would like to know if it is possible to figure out if any copy trading EA or copy trading service is used for the current account.
Basically, this "check" shall be included in an existing EA in order to prevent any copy trading service. In other words, it should not be allowed to use any copy trading service if the specific EA is used.

Thanks a lot in advance for your replies.

Best regards
 
EA_Trader1:
Dear all,

I would like to know if it is possible to figure out if any copy trading EA or copy trading service is used for the current account.
Basically, this "check" shall be included in an existing EA in order to prevent any copy trading service. In other words, it should not be allowed to use any copy trading service if the specific EA is used.

Thanks a lot in advance for your replies.

Best regards
Impossible to do...

You could check the MT5 environment for any EA running parallel, but, it you login with a second MT5, you have no awareness about it, and cannot prevent it.

Technically not realizable.
 
Dominik Egert #:
Impossible to do...

You could check the MT5 environment for any EA running parallel, but, it you login with a second MT5, you have no awareness about it, and cannot prevent it.

Technically not realizable.
Hi Dominik,

thanks a lot for your clear answer. Sad that it's not possible.
Regarding your comment if any EA is running parallel: Is this possible via the command MQLInfoInteger(MQL_PROGRAM_TYPE)? Or how can I detect all (!) EAs running on the actual account/terminal?

Best regards
 
EA_Trader1 #:
Hi Dominik,

thanks a lot for your clear answer. Sad that it's not possible.
Regarding your comment if any EA is running parallel: Is this possible via the command MQLInfoInteger(MQL_PROGRAM_TYPE)? Or how can I detect all (!) EAs running on the actual account/terminal?

Best regards
You need to loop through all open charts and retrieve the expert name, using ChartGetString


 
Dominik Egert #:
You need to loop through all open charts and retrieve the expert name, using ChartGetString


Thanks a lot for your fast reply.
I am trying to detect all other EAs on all charts which works for initialization. But my function does not work when another EA is applied on another chart AFTER this specific check - it seems that my function does not work in OnTick.

This is what I use:

int OnInit()
  {
      function_check(); 
  }

void OnTick()
  {
      function_check(); 
  }

void function_check()
 {
      long chartID=ChartFirst();
      while(chartID >= 0)
         {
            string EA_name = ChartGetString(chartID,CHART_EXPERT_NAME) + "_xxx";
            
            if(EA_name == "_xxx")
               {
                  Print("No EA on chart");
                  chartID = ChartNext(chartID);
                  continue;
               }
               
            if(EA_name != "hsiohfs_xxx")
               {
                  Print("another EA");
               }
            chartID = ChartNext(chartID);
         }
 }

Thanks in advance for your feedback!

 
EA_Trader1 #:

Thanks a lot for your fast reply.
I am trying to detect all other EAs on all charts which works for initialization. But my function does not work when another EA is applied on another chart AFTER this specific check - it seems that my function does not work in OnTick.

This is what I use:

Thanks in advance for your feedback!

I would try putting this into a service instead of an EA. Your implementation is depending on OnTick event, and also that it is actually running on a chart itself.

Else, I would expect your code to be working. But maybe you can integrate GetLastError as well, just to be sure to catch eventual errors.