fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    BreakEven

    Bug Reports
    2
    3
    1578
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      enochj last edited by

      Actual BreakEven management is done this way:

      		            double be_offset=0;
      		            if (BEoffsetMode=="pips") {be_offset=toDigits(BEPoffsetPips);}
      		            ModifyStops(attrTicket(),attrOpenPrice()+be_offset,attrTakeProfit());
      

      Isn't this better, so that the Stop will be set above open price in long trades, and below in short ones?

      		            double be_offset=0;
      		            double Modif=0;
      
      		            if (BEoffsetMode=="pips") {be_offset=toDigits(BEPoffsetPips);}
      		            if (attrType()==OP_BUY) {Modif=attrOpenPrice()+be_offset;}
      		            if (attrType()==OP_SELL) {Modif=attrOpenPrice()-be_offset;}
      		            ModifyStops(attrTicket(),Modif,attrTakeProfit());
      

      Excellent soft BTW! 😉

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        Yes, of course. Just made it negative for Sell type. Thank you for pointing this and for being able to understand some problem in detail.

        1 Reply Last reply Reply Quote 0
        • E
          enochj last edited by

          My pleasure. You did a great job. 😉

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          Online Users

          A
          M
          W
          E
          G
          K
          E
          A
          S
          O
          S
          A
          N
          J

          22
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors