fnCloseOrder








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


Order Selection

Determines what orders of the Account are closed.

  • 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.

lots

The number of lots to close.

  • VTS creates an extern (or Input)  variable named Lots that can be used for this parameter;  its default value is 1.0.
  • A value can be manually entered into the text-box.
  • A value can be selected using the Choose button.
  • The value can be entered as a percentage by selecting the Percent button. For example, if the original size of the order is 2 lots, selecting 50% will close 1 lot.

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.


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
fnModifyOrder
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