fnModifyOrder
- The fnModifyOrder function it used to modify the stoploss or takeprofit of an open order (position).
- The fnModifyOrder function is found in the Functions Toolbox under the Trade menu.
- The fnModifyOrder function is a user-friendly front end for the MQL function OrderModify.
- Selecting the configuration (+) button of fnModifyOrder function will display the fnModifyOrder Configuration Window.
- There are four tabs on the fnModifyOrder Configuration Window:
- The Configure Tab is used to set the values of the parameters of the Function.
- The Advanced Tab is used to set the values of the advanced 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 modified.
Note: Selecting Exact Ticket disables all other selection criteria. |
stoploss |
The value at which to close the trade for a loss.
|
takeprofit |
The value at which to close the trade for a profit.
|
comment |
A string of text that is assigned to the order. This text is displayed in the Trade tab of the MetaTrader platform. Note: The MetaTrader broker may change this text when the order is modified. |
color |
The color of the arrow drawn on the price chart. |
price |
New open price of the pending order. Only used for non-market orders. |
expiration |
A datetime value that causes the order to expire. Only used for non-market orders. |
The bottom portion of the window allows the Element Name to be saved.