fxDreema

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

    Button to bring Stop Loss to Break Even - Problem with Modify Stops of trades

    Questions & Answers
    2
    2
    1108
    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.
    • A
      adamghous last edited by

      Hi,

      I have made three simple buttons as shown in the image. One to enter a buy trade and one to enter a sell trade and one to bring my stop loss to break even.

      The buy and sell buttons enter trades and set a stop loss where I have a line object positioned on the chart and no take profit target is set. The break even button should bring the stop to break even but I can't get the EA to function correctly if I put the take profit to value in the Modify Stops of Trades block to 0.

      I don't have a take profit set and don't want a take profit set so how can I get my Stop loss to break even without entering something in the take profit value cell?

      Thanks for any advice
      Adam

      0_1540830906486_7ed4f24b-6a64-4311-90fa-074fd3ed862e-image.png

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

        (on Trade) Event Data will not work correctly under "on Chart". Better imagine that you are under "on Tick". The data for (on Trade) Event Data in only set when some trade event happens - when some order is created, removed or modified, but not when you click on a button.

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

        Online Users

        E
        T
        S
        A
        I
        A
        E
        S
        E

        21
        Online

        146.7k
        Users

        22.4k
        Topics

        122.6k
        Posts

        Powered by NodeBB Forums | Contributors