Button to bring Stop Loss to Break Even - Problem with Modify Stops of trades
-
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
-
(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.