+1 888 340 6572

Why an Order Was or Was Not Executed: Difference between revisions

From MultiCharts
No edit summary
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 its execution price and details (see [[Order_and_Position_Tracker#Orders_Tab|Orders Tab]]).
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:
# The order was '''rejected''' either by MultiCharts, or by the broker (in most cases, you can find the reason for rejection in the Logs tab of the Order and Position Tracker (see [[Order_and_Position_Tracker#Logs_Tab|Logs Tab]])  
* The order was '''rejected''' either by MultiCharts, or by the broker (in most cases, you can find the reason for rejection in the '''Logs''' tab of the Order and Position Tracker (see [[Order_and_Position_Tracker#Logs_Tab|Logs Tab]])  
# The order was '''cancelled''' from the script. According to the logic of EasyLanguage/PowerLanguage, an order will be maintained as long as the conditions for its generation are met on each calculation. Once a condition is not met, it will be cancelled.
* The order was '''cancelled''' from the script. According to the logic of EasyLanguage/PowerLanguage, an order will be maintained as long as the conditions for its generation are met on each calculation. Once a condition is not met, it will be cancelled.


<br>


==Monitoring from Script==
==Monitoring from Script==
Line 55: Line 54:
  "Bar Status is: ", barstatus(1)); <br>
  "Bar Status is: ", barstatus(1)); <br>
  end; <br>  
  end; <br>  
<div class="note">If using more than one data series, specify the DataNum for [[BarStatus]].</div>
<div class="note">If using more than one data series, specify the DataNum for [[BarStatus]].</div>
<br>
<br>
If the script is applied to your chart and it is opened in the PowerLanguage Editor, you will be able to see the following lines in the Output tab:
If the script is applied to your chart and it is opened in the PowerLanguage Editor, you will be able to see the following lines in the '''Output''' tab:
<div class="example-no-title">
<div class="example-no-title">
''The date is 10/8/2013,<br>
''The date is 10/8/2013,<br>