EA command to detach itself?
Results 1 to 4 of 4

Thread: EA command to detach itself?

  1. #1
    I have got an EA which can be set to handle an order. When it shuts the order, it continues looking each tick, and gives the error awake. Is there a command detach itself once its job is completed or to make it disable?

    Thanks.

  2. #2
    Quote Originally Posted by ;
    I have got an EA that can be set to handle an order. Once it shuts the order, it continues looking for it each tick, and provides the error awake. Is there a control to create it disable after its job is completed, or detach itself?

    Thanks.
    Hi
    use code such as this

    for(int I=0;ilt;OrdersTotal();I )

    if(OrderSelect(I,SELECT_BY_POS,MODE_TRADES)==false ) break;

    put here the code to operate if there are open orders


  3. #3
    To answer your question specifically, no one can not shut off an EA via code.

    Some decent choices are:Check to find out whether the order is present and return if it doesn't (which is just another flavor of the solution offered from Mtav). Once the order is closed, trip a variable indiing that there is nothing else to do.

  4. #4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.