How to programming my expert adisor to work only in tester , not real ?!

 

Hi friends , 

Please help me to program an expert advisor to work only in MT4 tester , what I must put /change in my open - cod ?


Thanks

 

Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
          No free help 2017.04.21

Or pay someone. Top of every page is the link Freelance.
          Hiring to write script - General - MQL5 programming forum 2018.05.12

We're not going to code it for you (although it could happen if you are lucky or the problem is interesting).
          No free help 2017.04.21

 
William Roeder:

Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
          No free help 2017.04.21

Or pay someone. Top of every page is the link Freelance.
          Hiring to write script - General - MQL5 programming forum 2018.05.12

We're not going to code it for you (although it could happen if you are lucky or the problem is interesting).
          No free help 2017.04.21

I want to send the robot to someone who can only test it without actually using it, I still have copyright.

 
int OnInit()
  {
   if(!MQLInfoInteger(MQL_TESTER)) ExpertRemove();
   EventSetTimer(1);
   return(INIT_SUCCEEDED);
  }
 
Pham Khanh Duy:

Hi Pham Khanh Duy


I have there function for Digits, it is good ?


int OnInit()
  {
   if (Digits == 3 || Digits == 5)
  
   TakeProfit *=10;
   Step       *=10;
   {
   if(!MQLInfoInteger(MQL_TESTER)) ExpertRemove();
   EventSetTimer(1);
   return(INIT_SUCCEEDED);
  }
   }

 
Kostadin Yankov:

Please edit your post and use the code button (Alt+S) when pasting code.

EDIT your original post, please do not just post the code correctly in a new post.

 
int OnInit()
{
   if (Digits == 3 || Digits == 5)
   {
     TakeProfit *=10;
     Step       *=10;
   }

   if(!MQLInfoInteger(MQL_TESTER)) ExpertRemove();

   EventSetTimer(1);
   return(INIT_SUCCEEDED);

}

It's better...

 
remcous:

It's better...

OOOO, you are great ;) Thanks for solving my problem!

 
Keith Watford:

Please edit your post and use the code button (Alt+S) when pasting code.

EDIT your original post, please do not just post the code correctly in a new post.

Oh Sorry , I will use it next time !

int OnInit()
  {
   if (Digits == 3 || Digits == 5)
   
   TakeProfit *=10;
   Step       *=10;
   {
   if(!MQLInfoInteger(MQL_TESTER)) ExpertRemove();
   EventSetTimer(1);
   return(INIT_SUCCEEDED);
  }
   }
 
Keith Watford:

Please edit your post and use the code button (Alt+S) when pasting code.

EDIT your original post, please do not just post the code correctly in a new post.

Kostadin Yankov:

Oh Sorry , I will use it next time !

I put  EDIT your original post   in bold and italic so that you can't miss it.

Yet you totally ignore it!