fnCloseOrder
- The fnCloseOrder function it used to fully or partially close an open order (position).
- The fnCloseOrder function is found in the Functions Toolbox under the Trade menu.
- The fnCloseOrder function is a user-friendly front end for the MQL function OrderClose.
- Selecting the configuration (+) button of fnCloseOrder function will display the fnCloseOrder Configuration Window.
- There are three tabs on the fnCloseOrder Configuration Window:
- The Configure Tab is used to set the values of the parameters of the Function.
- The Message Tab is used to send a message from the Function Element.
- The Notes Tab is used to add notes or comments to the Function Element.
The following table provides information about each parameter of the fnModifyOrder function.
Order Selection |
Determines what orders of the Account are closed.
Note: Selecting Exact Ticket disables all other selection criteria. |
lots |
The number of lots to close.
|
price |
The price at which to enter the order. MetaTrader usually requires Sell orders to use the Ask price and Buy orders to use the Bid price. |
slippage |
The amount of points, as an integer, the price can move from the requested close price. VTS creates an extern (or Input) variable named Slippage that can be used for this parameter; its default value is 3. |
color |
The color of the arrow drawn on the price chart. |
The bottom portion of the window allows the Element Name to be saved.