Scripts which are assigned to the Trade List context are displayed under the widget's Tools menu. For example, you could create a script which calculates a technical indicator and closes any trade based on the indicator value for its market.
(Note: scripts can also be assigned to the Order Menu context. This causes them to be displayed under the All/Filtered Orders and Selected Orders sub-menus of the Tools menu.)
The script receives the following information in its
| Member | Description |
| scriptContext | Set to "tradelist" |
| listMode | Selected mode for the list. One of "trades", "pending", or "all". |
| listedOrders[] | Array of all orders markets currently loaded into the trade list (which will match all the trades/orders currently existing on the account, depending on the value of the |
| filteredOrders[] | Array of all orders which meet any filtering, and are currently visible in the trade list |
| selectedOrders[] | Array of order which are currently selected by the user (and highlighted) in the trade list |