How to implement "Close by" order?
-
Hi Guys,
As I know MT4 offers order named "Close by".
Using it if you close Sell trade by opening Buy trade it cost less and vice versa, if you close Buy trade by opening Sell trade it costs less.
As title says, I would like to open Buy trade by closing Sell trade and vice versa, to open Sell trade by closing Buy trade.
It's because my strategy opens Buy when closing Sell and vice versa, opens Sell when closing Buy.
I believe it is something like "Net off".
Is there any way to implement that function in my EA by fxdreema?
Best regards and thanks in advanced,
Mihajlo -
Can you please confirm this is correct?
- A buy is closed IMMEDIATELY AFTER a sell is open.
Or maybe you mean this?
- AS SOON AS a buy is open, a sell is closed.
-
First, thank you for your answer! Regarding to your question I don't care what will happen first and second. I just know that you can close one trade by another opposite trade.
Here you can see picture examples:


-
Hello,
did you get to find a way for the close by command, as I'm interested in the same matter; i have buy and sell orders, and i want to close all of the orders when there is a specific profit using a close by order; -
You can do this by using pink 'for each trade' blocks connected one to the previous one by the yellow output dot. However, you need to specify very accurately what 'closed by' trade will be selected.
-
@l-andorrà the addressing of the trades to be closed will be using the connected objects is this what you mean;