×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts
Open main menu

Changes

Strategy Orders Monitor

11,176 bytes added, 14:08, 28 August 2023
m
no edit summary
'''Strategy Orders Monitor''' is a separate application that is supported for MultiCharts64.
It visualizes orders generated by the strategy in real-time, during [[Data Playback]] and auto trading.
The application has no influence on the strategy’s logic, calculation speed and or order generation. <br>'''Strategy Orders Monitor''' information relates to the current working session of all MultiCharts and instances. As soon as any of the instances are closed its information will be cleared when in the [[MultiCharts Processes|TradingServer]] process is closedStrategy Orders Monitor window. One can set up the frequency of information automatic updates in the '''Strategy Orders Monitor''' settings.<br>
Strategies and orders from Portfolio Trader are not displayed.<br>
To open '''Strategy Orders Monitor''', in the '''Main''' menu select '''File''', then point to '''New''' and click '''New Strategy Orders Monitor''' Windowor click on the '''Strategy Orders Monitor icon''' on the main toolbar.
== General Mode ==
[[File:General_Mode.png|none|General Mode]]'''Strategy Orders Monitor''' is started in general mode'''General Mode'''.<br>It displays the list of strategies calculating in real-time, Data Playback or auto trading. It also includes strategies which were calculating before calculated previously in one any of the specified above modes and finished the calculation. If the strategy has stopped calculating in real-time, its information stops updating and its line turns grey in the list. One Such lines can remove such lines be removed from the list.<br>The strategies are grouped by MultiCharts instances and workspaces. The Each line in the list of strategies includes strategy names the strategy’s name and inputs, as well as the main financial metrics indices and calculation start/end timetimes.  The financial metrics correspond to the values of the following keywords:<br>
NetProfit = i_ClosedEquity<br>
Equity = i_openequity<br>
Avg Entry Price = i_AvgEntryPrice<br>
OpenProfit = i_ClosedEquity - i_openequity<br>
 
=== General mode settings ===
Click on the gear icon to open the '''Settings''' window. Adjust the settings on the '''General''' tab if required.<br>
* Move the '''Update frequency''' slider to set up the automatic information update timeout in seconds. It is set to 1 sec by default.<br>
* In the '''Spreadsheet view settings''' one can check/uncheck the columns to be displayed and set their order by dragging the item and dropping it in the desired place.<br>
* Click '''Use as default''' to apply the settings to all new '''Strategy Orders Monitor''' windows.<br>
== Detailed Mode ==
[[File:Detailed_Mode.png|none|Detailed Mode]]
Click on the strategy line to open the '''Detailed''' mode where one can see the orders generated by the selected strategy in real-time.<br>
'''Strategy Orders Monitor''' in the detailed mode shows:<br>
* The line with general information about the selected strategy (the same as in the general mode).<br>
* 1–3 1, 2 or 3 tables with information about real-time orders of the selected strategy. By default, all orders are included in one table.<br>=== Detailed mode settings ===Right click on a table to open the shortcut menu. Use one of the following options if required.: <br>
* '''Export to Excel''' to export the table’s content to Excel;
* '''Copy''' to copy the line’s content to clipboard;
* '''Copy All''' to copy the table’s content to clipboard;
* '''Text Size''' to adjust the font size;
* '''Theme''' to adjust the background and font color.<br>In order to return to the general mode, click the left arrow in the upper left corner.
=== Detailed mode settings ===
Click on the gear icon to open the '''Settings''' window. Adjust the settings on the '''Strategy Details''' tab if required.<br>
* In the '''Time zone''' section select '''Chart''' or '''Local''' radio button to display the time in the tables in the corresponding time zone.
* In the '''Spreadsheet view settings''':<br>:– One can use In the '''Aggregate the tables by order state''' control to section select from the drop-down list whether to display the orders in a single table or divide them among two or three tables according to their statestatus.<br><div style="background-color: #E3FBE5;">'''Note''': The total number of orders does not depend on how many tables they are divided into. </div>:– One can checkCheck/uncheck the columns to be displayed and set their order by dragging the item and dropping it in the desired place.
* Click '''Use as default''' to apply the settings to all new '''Strategy Orders Monitor''' windows.<br>
In order == Tables in the Detailed Mode ==The tables contain information about orders status in auto trading (SA mode) or in the Backtesting Engine (forward testing, auto trading in asynchronous mode).<br>All orders gradually go through the certain statuses. Depending on the status, they are placed in the corresponding table.<br>* '''Table 1. Generated orders.'''<br>It is the status of orders when they are prepared to return be sent on the next tick. For example, the data stops updating at the session end on Friday, and the orders that shall be sent on Monday morning, are generated on the last tick of Friday’s session.<br>* '''Table 2. Active orders.'''<br>It is the status of orders when they are processed by the Backtesting Engine. The Backtesting Engine executes the orders in forward testing and asynchronous mode of auto trading. There are no active orders in the synchronous mode of auto trading.<br>* '''Table 3. Finalized orders.'''<br>It is the status of orders when they are canceled, rejected or filled.<br> As it was mentioned above, it is possible to divide the orders between one, two (Generated / Active and Finalized) or three tables (Generated / Active / Finalized). Regardless of the number of tables, the general quantity of orders is always the same. All tables have the same columns, though some columns may be unfilled if there is no relevant information.<br>== How the Orders are Displayed in the Detailed Mode Tables == [[File:How the orders are displayed (2).png|none|How the Orders are Displayed]]== Columns of the Tables in Detailed Mode == <table border="1" cellspacing="0" cellpadding="6" >  <tr><td style="background-color:#fad67d;" valign="top" > </td><td style="background-color:#fad67d;" valign="top" ><p>'''Generated''' </p></td><td style="background-color:#fad67d;" valign="top" ><p>'''Filled\Cancelled'''</p></td><td style="background-color:#fad67d;" valign="top" ><p>'''Instruction'''</p></td><td style="background-color:#fad67d;" valign="top" ><p>'''Name'''</p></td><td style="background-color:#fad67d;" valign="top" ><p>'''State'''</p></td><td style="background-color:#fad67d;" valign="top" ><p>'''Action'''</p></td><td style="background-color:#fad67d;" valign="top" ><p>'''Type'''</p></td><td style="background-color:#fad67d;" valign="top" ><p>'''Category'''</p></td><td style="background-color:#fad67d;" valign="top" ><p>'''Qty'''</p></td><td style="background-color:#fad67d;" valign="top" ><p>'''Exit From'''</p></td><td style="background-color:#fad67d;" valign="top" ><p>'''Stop Price'''</p></td><td style="background-color:#fad67d;" valign="top" ><p>'''Limit Price'''</p></td><td style="background-color:#fad67d;" valign="top" ><p>'''IOG Mode'''</p></td><td style="background-color:#fad67d;" valign="top" ><p>'''Qty Filled'''</p></td><td style="background-color:#fad67d;" valign="top" ><p>'''Filled'''</p></td></tr> <tr><td style="background-color:#E3FBE5;" valign="top" ><p> </p> <p>'''Generated'''</p></td><td valign="top" ><p>The time of order generation (in Exchange or Local time) </p></td><td valign="top" ><p>-</p></td><td valign="top" ><p>The description of the order in the script: buytocover from contracts market;</p></td><td valign="top" ><p>The name of the order from the script</p></td><td valign="top" ><p>Generated</p></td><td valign="top" ><p>Buy</p> <p>/</p> <p>Sell</p></td><td valign="top" ><p>Entry</p> <p>/</p> <p>Exit</p></td><td valign="top" ><p>Market</p> <p>/</p> <p>Marketrange (for .Net version only)</p> <p>/</p> <p>Limit</p> <p>/</p> <p>Stop</p> <p>/</p> <p>Stop-Limit</p></td><td valign="top" ><p>Only if specified in the script</p></td><td valign="top" ><p>For exit orders will specify whether the whole position or a specific order is exited. If available, contract price and quantity is displayed</p></td><td valign="top" ><p>Stop Price</p></td><td valign="top" ><p>Limit Price</p></td><td valign="top" ><p>On</p> <p>/</p> <p>Off</p></td><td valign="top" ><p>-</p></td><td valign="top" ><p>-</p></td></tr> <tr><td style="background-color:#E3FBE5;" valign="top" ><p>'''Active'''</p> </td><td valign="top" ><p>The time of order generation (in Exchange or Local time)</p></td><td valign="top" ><p>-</p></td><td valign="top" ><p>The description of the order in the script: buytocover from contracts market;</p></td><td valign="top" ><p>The name of the order from the script</p></td><td valign="top" ><p>Activated</p> <p>/</p> <p>Working</p> <p>/</p> <p>Pending</p></td><td valign="top" ><p>Buy</p> <p>/</p> <p>Sell</p></td><td valign="top" ><p>Entry</p> <p>/</p> <p>Exit</p></td><td valign="top" ><p>Market</p> <p>/</p> <p>Marketrange (for .Net version only)</p> <p>/</p> <p>Limit</p> <p>/</p> <p>Stop</p> <p>/</p> <p>Stop-Limit</p></td><td valign="top" ><p>Only if specified in the script</p></td><td valign="top" ><p>For exit orders will specify whether the whole position or a specific order is exited. If available, contract price and quantity is displayed</p></td><td valign="top" ><p>Stop Price</p></td><td valign="top" ><p>Limit Price</p></td><td valign="top" ><p>On</p> <p>/</p> <p>Off</p></td><td valign="top" ><p>-</p></td><td valign="top" ><p>-</p></td></tr> <tr><td style="background-color:#E3FBE5;" valign="top" ><p>'''Finalized'''</p> </td><td valign="top" ><p>The time of order generation (in Exchange or Local time)</p></td><td valign="top" ><p>The time of order execution in Backtesting</p> <p>or</p> <p>The time of receiving the final status from the broker </p> <p>(in Exchange or Local time)</p> </td><td valign="top" ><p>The description of the order in the script: buytocover from contracts market;</p></td><td valign="top" ><p>The name of the order from the script</p></td><td valign="top" ><p>Filled</p> <p>/</p> <p>Cancelled</p> <p>/</p> <p>Rejected</p></td><td valign="top" ><p>Buy</p> <p>/</p> <p>Sell</p></td><td valign="top" ><p>Entry</p> <p>/</p> <p>Exit</p></td><td valign="top" ><p>Market</p> <p>/</p> <p>Marketrange (for .Net version only)</p> <p>/</p> <p>Limit</p> <p>/</p> <p>Stop</p> <p>/</p> <p>Stop-Limit</p></td><td valign="top" ><p>The initial number of contracts </p></td><td valign="top" ><p>For exit orders will specify whether the whole position or a specific order is exited. If available, contract price and quantity is displayed</p></td><td valign="top" ><p>Stop Price</p></td><td valign="top" ><p>Limit Price</p></td><td valign="top" ><p>On</p> <p>/</p> <p>Off</p> <p>/</p> <p>-</p></td><td valign="top" ><p>The quantity of filled orders</p></td><td valign="top" ><p>The filling price</p></td></tr> </table> === The State Column === All active orders are assigned a State:* '''Working''' – orders that are sent on every tick and can be filled on any of them if the conditions in the script are met. * '''Activated''' – one of the exit strategies for the order/position has been activated: ''setstoploss'', ''setprofittarget'', ''setbreakeven'', ''setdollartrailing''. The activated strategies are always displayed in pairs: exit strategy from long and short position or order (depending on the modeof ''setstopconract'', ''setstopposition'').*'''Pending''' – the deferred order generated by the exit strategy (''setbreakeven'', ''setpercenttrailing'') and waiting for the activation price (displayed as a Stop price).=== The Category Column ===The following types of orders are distinguished in MultiCharts.* '''Market Orders''' generated by ''this bar close'', ''next bar market'', ''next bar open'', ''marketrange'' (in MultiCharts.Net only) commands and by ''ClosePosition'' order generated after auto trading termination.* '''Price Orders''' generated by ''next bar limit'', ''next bar stop'', ''next bar stop limit'' commands.* '''ChangeMarketPosition''' orders generated by ''ChangeMarketPosition'' or ''InitialEntry'' commands from ''Assign Initial Market Position at the Broker'' option set in Auto Trading settings. This type is displayed in the Finalized orders table only. * '''PlaceMarketOrder''' orders are not displayed in the Strategy Orders Monitor as they do not get through the BackTesting Engine.* '''Special Orders''' generated by one on the following commands: <br>SetStopLoss <br>SetProfitTarget <br>SetDollarTrailing <br>SetBreakEven <br>SetPercentTrailing <br>the same with *_pt extension == How Different Categories of Orders are Displayed in the Strategy Orders Monitor ===== Special Orders ===Here is an example of how the special orders generated by the '''BreakEven per contract''' strategy are displayed in the Strategy Orders Monitor.* marketposition = 0 <br> Two orders appear in the table: <br> BreakEven Stop from long entry Activated <br> BreakEven Stop from short entry Activated* The first entry order is filled, MP=1: <br> Three BreakEven orders appear in the table: <br> BreakEven Stop from long entry '''Activated''' <br> BreakEven Stop from short entry '''Activated''' <br> BreakEven Stop from long entry 1@123.45 Limit = 124.45 '''Pending'''* The order activation price is reached: <br> BreakEven Stop from long entry '''Activated''' <br> BreakEven Stop from short entry '''Activated''' <br> BreakEven Stop from long entry 1@123.45 Stop = 123.45 '''Working''' === Stop-Limit Orders ===* Before the Stop price is reached Stop-Limit orders are displayed as '''Active Stop-Limit''' orders.* After the Stop price is reached Stop-Limit orders are displayed as '''Limit''' orders.* Filled Stop-Limit orders are displayed as '''Limit''' orders.<div style="background-color: #E3FBE5;">'''Note''': Regardless of the state of the Stop-Limit order, the Instruction column will display buy xx stop yy limit. All the other columns depend on the state of the order. </div> == How the Orders Generated During Auto Trading are Displayed in the Strategy Orders Monitors. ===== Auto Trading in Asynchronous Mode. ===In Asynchronous Mode only the orders generated in real-time calculation are displayed. <div style="background-color: #E3FBE5;">'''Note''': During Auto Trading in Asynchronous mode the way orders are displayed is the same as during ForwardTesting, as the orders filled do not go through the BackTesting Engine. </div>=== Auto Trading in Synchronous Mode ===* The collection of the generated orders is received from the BackTesting Engine. No orders are displayed in the Active Orders table as they are filled at the broker. * The Finalized Orders table displays all the orders generated by Auto Trading. <br> <div style="background-color: #E3FBE5;">'''Note''': Some information in this table may be missing (order cancellation time, initial price, contracts quantity). </div>* The filled orders displayed in the Strategy Orders Monitor must coincide with the orders displayed on the chart. == Exporting orders in CSV ==To export the orders from the '''Strategy Orders Monitor''': :1. Open the ''' Strategy Orders Monitor''' Window.<div style="background-color: #A6BCBA;">To open '''Strategy Orders Monitor''', in the Main menu select '''File''', then point to '''New''' and click '''New Strategy Orders Monitor Window''' or click on the '''Strategy Orders Monitor''' icon [[File:MultiCharts Strategy Orders Monitor icon.png]] on the main toolbar. Select the strategy you need to export.For multiple selection use Shift+left-click or CTRL+left arrow -click.</div>:2. Click the '''Export''' icon [[File:MultiCharts_Exporting_Orders.png]] in the upper left corner'''Strategy Order Monitor''' main menu
== Tables in It is possible to customize the Detailed Mode ==The exported tables contain information about orders states in auto trading (SA mode) or in the Backtesting Engine (forward testing, auto trading in async mode).<br>All orders gradually go through the certain states. Depending on the state, they are placed in the corresponding table.<br>* '''Generated'''<br>it is the state of orders when they are prepared for sending on the next tick. For example, the data stops updating at the session end on Friday, and the orders, To do that shall be sent on Monday morning, are generated on the last tick of Friday’s session.<br>* '''Active'''<br>it is the state of orders when they are processed by the Backtesting Engine. The Backtesting Engine executes the orders in forward testing and async mode of auto trading. There are no active orders in the sync mode of auto trading.<br>* '''Finalized'''<br>it is the state of orders when they are canceled, rejected or filled.<br>:
As was mentioned above, it is possible :1. In '''Strategy Orders Monitor Settings''' select the '''Export''' tab. Enable the '''Headers''' option if you would like to divide see the Headers.:2. Select the orders between one, two (Generated / Active columns to be exported by dragging and Finalized) dropping them to the '''Selected''' section or three tables (Generated / Active / Finalized)by using arrows.[[File:MultiCharts Adjusting Columns.png|none]]:3. Disregard Double-click on the number '''Sorting''' arrow to select Descending or Ascending order of tables, the general quantity of orders is always data in the sameselected.[[File:MultiCharts Sorting Columns. All tables have png|none]]:4. To rename the same columns, though some columns may be unfilled if there is no relevant informationcolumn double-click on its name.
[[Category:Strategy Trading]]