Forum

MQL4 How can I return the current profit on an open order based on the order comment

I'm trying to return the current profit on an open order based on the order comment. Right now, my code below is getting the profit of all open orders as opposed to just the order with a specific comment. I have an order with order comment "Testing". So, what I want to return is the profit for only

Remove TP from Buy order when sell stop activated

Hello, I've coded a basic MQL4 EA to open a BUY order and SELL STOP order at the same time. I would like to know if it's possible to remove the TP from the BUY order once SELL STOP order is activated. So below is the BUY order with TP 10 points...but I would like for the EA to set that TP to 0 once