Hi folks,
With you in this journey Coders Guru, I’m trying to simplify the world of MetaTrader, The world of one of the best trading platforms.
Today we are going to study how to open, close and modify trading positions.
Opening and Closing a trade position:
In the first time you decide to open a trade position (short or long), you command the broker though the MetaTrader terminal to execute the order for first time. The broker opens executes the command instantly if it’s an instant order or it wait for the conditions you specified if it’s a pending order.
The opening of a position can be occurred manually from the MetaTrader New Order command or can be occurred automatically from your Expert Advisor.
Closing a position is a same, you command the broker though the MetaTrader terminal to close an opened position instantly.
The closing of a position can be occurred manually from the MetaTrader Close Order command or can be occurred automatically from your Expert Advisor in two cases:
By the execution of the Stop Loss order.
By the execution of the Take Profit order.
Closing a trade position by a reverse order:
You can close a position(s) by executing a reverse order. For example there’s a short opened order and you open a reverse long order which order will close the short position and open the long one. The calculation of the deference between the opened and closed positions will be calculated depending on the size of the both positions.
Instant Execution Technology:
MetaTrader terminal has various execution technologies: Instant Execution, Request Execution and Market Execution. We are concerned in this article about the Instant Execution Technology.
Instant Execution Technology (IE) is the an immediately action be taken by pressing the buttons Sell and Buy in the New Order window (Figure 1). By prssing these buttons execute instantly the order at the appeared quotation.

Figure 1 - New order window
Sometimes and during the pressing of Sell and Buy buttons and because of the fast movement of the price a new quotation has been arrived. In this case the “Requote” window (Figure 2) will appear that enables you to execue your position with the new quotation. The “Requote” window will appear also in the case of closing a position and a new quotation has been arrived.

Figure 2 - Requote window
Modifying a trade position:
The modification of already opened order means changing the Stop Loss and Take Profit levels of the order. This can be done manually from by clicking Modify Or Delete Order and then from the Order window (Figure 3) you change the Stop Loss and Take Profit levels, or automatically from the Expert advisor.

Figure 3 - Modify order
We will discuss in details the Stop Loss and Take Profit (and Trailing Stop) limits in the coming article but you have to know at least the concept of them:
Stop loss:
It’s a limit point you set to your order when reached the order will be closed, this is
useful to minimize your lose when the market going against you.
Stop losses points are always set below the current asking price on a buy or above the
current bid price on a sell.
Trailing Stop:
It’s a kind of stop loss order that is set at a percentage level below (for a long position) or
above (for a short position) the market price. The price is adjusted as the price fluctuates (The price is adjusted by an Expert advisor running).
Take profit:
It’s similar to stop lose in that it’s a limit point you set to your order when reached the
order will be closed
There are, however, two differences:
_ There is no “trailing” point.
_ The exit point must be set above the current market price, instead of below.
I hope you enjoyed the article.
Coders Guru