fnModifyOrder








The following table provides information about each parameter of the fnModifyOrder function.


Order Selection

Determines what orders of the Account are modified.

  • All: all open orders on the account.
  • Symbol: only open orders matching the selected symbol.
  • Order Type: only open orders of the selected order type.
  • MagicNumber: only open orders with a matching magicnumber.
  • Exact Ticket: only open orders with the matching order ticket.

Note: Selecting Exact Ticket disables all other selection criteria.

stoploss

The value at which to close the trade for a loss.

  • VTS creates an extern (or Input)  variable named StopLoss that can be used for this parameter;  its default value is 200.
  • A value can be manually entered into the text-box.
  • A value can be selected using the Choose button.
  • A value can be entered as an integer or as a price level by selecting the Offset value or Absolute value button.  The Absolute value option is useful for using technical indicator values or price values such as Low[1] or High[1].

takeprofit

The value at which to close the trade for a profit.

  • VTS creates an extern (or Input)  variable named TakeProfit that can be used for this parameter;  its default value is 200.
  • A value can be manually entered into the text-box.
  • A value can be selected using the Choose button.
  • A value can be entered as an integer or as a price level by selecting the Offset value or Absolute value button.  The Absolute value option is useful for using technical indicator values or price values such as Low[1] or High[1].

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.

Related Topics:
What is VTS
System Requirements
Installing VTS
Main Menu
Toolbox FUNCTIONS Pane
Expert Advisor Facts
Configure
PLATFORM Function
Custom Indicators
TRADETIME Manager
COMMUNICATION Manager
Message
Logic
MetaTrader Platform Configuration
Compiler
Compiler Flags
Platform
Editor
EA Output Folder
Custom Indicator Folder
fnOpenOrder
fnCloseOrder
MetaTrader Platform
Journal Tab
Experts Tab
Expert Menu
MQL Help
Trade Tab
ECN Brokers
Logic
Candlestick Function Parameters
Candlestick Drawing
Using Easy Email with the fnSendEzEmail Function
Testing the Easy Email Connection
Objects on the MetaTrader platform
Manually drawing a trend line
Removing a trend line
Building an Expert Advisor to draw and manage a trend line
Script & Multi-Platform Plug-in
Building a MetaTrader Script
Using the Multi-Platform Feature
Client-Side Stops Plug-in
Emergency Stops
Using Client-Side Stops
Objects on the MetaTrader Platform
Manually Drawing a Fibonacci Retracement
Removing a Fibonacci Retracement
Building an Expert Advisor to draw and manage a Fibonacci retracement
Signal Type: Element
Signal Type: Logic Condition
Using the Code Block Feature
EA-Indicator Price Chart
EA-Indicator Video
Chart Objects Plug-in
fnDrawHorizontalLine
fnDrawVerticalLine
fnDrawArrow
fnDrawThumb
fnDrawLabel
fnDrawText
fnDrawCheckSign
fnDrawStopSign
Chart Objects on a MetaTrader Price chart
Adding Symbols
EA Secure Configuration
Chart Execute Plug-in
Chart Execute Configuration
Chart Execute on Price Chart
Using Chart Execute
Chart Execute Notes
Pivot Points on a MetaTrader Price Chart
fnFileRead
fnFileWrite
fnDeleteFile
Multi Trade on a MetaTrader Price Chart
Using the Debug Manager Plug-in
MQL Event Documentation