Why an Order Was or Was Not Executed: Difference between revisions
From MultiCharts
Why an Order Was or Was Not Executed (view source)
Revision as of 16:32, 12 September 2022
, 12 September 2022→Order and Position Tracker
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
==Order and Position Tracker== | ==Order and Position Tracker== | ||
If an order was generated and sent from the script to a broker plugin, it is displayed in the [[Order_and_Position_Tracker|Order and Position Tracker]] on the Orders tab. If an order is filled, you can see | If an order was generated and sent from the script to a broker plugin, it is displayed in the [[Order_and_Position_Tracker|Order and Position Tracker]] on the Orders tab. If an order is filled, you can see its execution price and details (see [[Order_and_Position_Tracker#Orders_Tab|Orders Tab]]). | ||
<br> | <br> | ||
There are 2 possible reasons why an order is not placed at the broker: | There are 2 possible reasons why an order is not placed at the broker: | ||
Line 12: | Line 12: | ||
==Monitoring from Script== | ==Monitoring from Script== | ||
This method is extremely useful not only for backtesting, since the Order and Position Tracker has nothing in common with the historical calculation process, but also for live auto trading because you can see the strategy logic printed out in real-time. | This method is extremely useful not only for backtesting, since the [[Order_and_Position_Tracker|Order and Position Tracker]] has nothing in common with the historical calculation process, but also for live auto trading because you can see the strategy logic printed out in real-time. | ||
Adding the following line under the same conditions right before the line, when generating your buy/sell orders, will help you to understand at what particular bar, when, and at what price your order is triggered in the code: | Adding the following line under the same conditions right before the line, when generating your buy/sell orders, will help you to understand at what particular bar, when, and at what price your order is triggered in the code: | ||
<br> | <br> |