Page 2 of 612 FirstFirst 12
Results 11 to 18 of 18

Thread: How to give a manually entered trade the same MagicNumber as EA

  1. #11
    Quote Originally Posted by ;
    I'll try it like this then dual GetCurrentTPBuy(){ double tp=0.0; for(int x=0;xlt;OrdersTotal();x ){ if(OrderSelect(x,0) OrderSymbol()==Symbol() ( OrderMagicNumber()==MagicNumber || OrderComment()== quot;ManualTradequot; ) OrderType()==OP_BUY) tp=NormalizeDouble(OrderTakeProfit(),Digits); break;
    One thing to bear in mind is that brokers can change or add to an order remark. So you need to be cautious in case your code checks for equality -LRB-==-RRB-

  2. #12

  3. #13
    Quote Originally Posted by ;
    quote Yes that's a fantastic solution!
    Thank you

    Quote Originally Posted by ;
    Thank you. Im still learning
    We are all still learning!

  4. #14
    Place the magic number to 0 at the ea.

  5. #15
    Quote Originally Posted by ;
    Set the magic number to 0 at the ea.
    This will work only if he wants to manage ALL manual orders... not only specific ones...

    BTW, that's a good alternative!

  6. #16
    Quote Originally Posted by ;
    Establish the magical number to 0 at the ea.
    Works perfectly.Thank you very much

  7. #17
    Quote Originally Posted by ;
    quote Works perfectly.Thank you very much
    Glad I could help.

  8. #18
    You can not assign to a manual order a magical like an EA does.

    The way you can do if you have the source code of this EA is to test orders at the terminal also with using their OrderComment()... Then when you enter a manual order, just fill the comment area with the magic number.

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.