Please help a noob - order closing issue
Page 1 of 502 12 LastLast
Results 1 to 10 of 14

Thread: Please help a noob - order closing issue

  1. #1
    Hello

    Why is this not working if I might ask:

    The EA works when I've just the profit side of things but once I add the loss side as well it opens and closes the orders immediately after launching the pending orders which it places.I just want the EA to close all order when a particular profit or loss level is attained....

    (Please bear in mind I just started coding about a month ago.Also how do I add code in that funny window here atforexintuitiveand not at the primary article )



    In the International area I announce:



    double initaite_equity=0;



    From the init I announce:


    initaite_equity=AccountEquity();






    Then in the OnTick:

    if(Enable_Total_Profit==true)

    if(AccountEquity()-initaite_equitygt;=Total_Profit)

    Print(The Desired_Profit attained as complete profit is at: Total_Profit);
    CloseAll();


    if(Enable_Total_Profit==true)

    if (initaite_equity)-(AccountEquity()gt;=Total_Loss);
    Print(Max reduction reaced at: Total_Loss);
    CloseAll();













    Thanks for your time



  2. #2
    Quote Originally Posted by ;
    It should be fine... You still have parenthesis around (AccountEquity())... that is not needed.
    The Master speaketh....


    You are an wonderful guy FF, bless you!

  3. #3
    Unsure what you mean

    This greater....

















    If(Enable_Total_Profit==true)

    if(AccountEquity()-initaite_equitygt;=Total_Profit)

    Printing (The Desired_Profit attained as complete profit is at: Total_Profit);
    CloseAll();








    if(Enable_Total_Profit==true)

    if (initaite_equity -(AccountEquity())gt;=Total_Loss);

    Printing (Max Loss reaced in: Total_Loss);
    CloseAll();
    }


    }


    However just to check my statement for the loss side with an account size of say 5000
    if Total_Loss== 30
    if (initaite_equity -(AccountEquity())gt;=Total_Loss);

    if (5000 - 4969.99) gt;= 30
    Close()

    Thats right isnt it?


    Thank for the time



  4. #4
    It should be nice...

    which you still have parenthesis around ( AccountEquity())... that is not needed.

  5. #5

  6. #6

  7. #7
    Hi Ferru. While I have multiple instances of the identical indior in 1 window eg, multiple stochastics, it merely reveals the merits of the initial stoch I add, rather than the others. How do I turn on this feature? Or possibly it turned off ?

  8. #8
    Quote Originally Posted by ;
    Hi Ferru, quick question. When I have multiple examples of the same indior in 1 window eg, multiple stochastics, it merely shows the worth of the initial stoch I insert, and not others. How do I turn on this feature? Or maybe it flipped off unknowingly?
    To be frank, I don't understand. It appears to be a bug in the recent builds... It's displaying perfectly both worth in the (great old) 509 build.

  9. #9
    Quote Originally Posted by ;
    quote The Guru speaketh.... you're an amazing man FF, bless you!

  10. #10
    Quote Originally Posted by ;
    quote To be frank, I really don't understand. It appears to be a bug in the recent builds... It is displaying perfectly both worth in the (good old) 509 build.
    Thank you for clearing that up. I believed it was happening only on my mt4. I tried turning off and on a couple things, such as object descriptions , but nothing works. Anyway, not a significant issue.

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 more information