Difference between revisions of "Why chart shows no trades"

From MultiCharts
Jump to navigation Jump to search
m (Reverted edits by Vlada Krutogolovaya (talk) to last revision by KateMultiCharts)
Tag: Rollback
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
==General information==
 
==General information==
  
Requirements for an '''executed-at-broker account order''' to be displayed on chart:
+
Requirements for an '''executed-at-broker account order''' to be displayed on the chart:
* '''Chart''' of the traded market should be''' plotted'''. The '''date and time of the executed order''' should be covered by chart '''[[Data Range]]''',
+
* '''Chart''' of the traded market should be''' plotted'''. The '''date and time of the executed order''' should be covered by the chart's '''[[Data Range]]''',
 
* Corresponding [[Broker Profiles Overview| '''Broker Profile''']] should be connected,
 
* Corresponding [[Broker Profiles Overview| '''Broker Profile''']] should be connected,
 
* [[Chart Trading| '''Chart Trading Panel''']] should be '''opened''' at least once,
 
* [[Chart Trading| '''Chart Trading Panel''']] should be '''opened''' at least once,
 
* The correct [[Chart Trading#Selecting Account| '''Broker Account''']] should be selected in the panel,
 
* The correct [[Chart Trading#Selecting Account| '''Broker Account''']] should be selected in the panel,
* '''Show Historical Orders''' box should be checked in [[Chart Trading#Chart Trading Settings| '''Chart Trading Settings''']],
+
* The '''Show Historical Orders''' box should be checked in the [[Chart Trading#Chart Trading Settings| '''Chart Trading Settings''']],
 
* The '''order''' should be '''visible''' in the [[Order and Position Tracker#Orders Tab| '''Orders tab''' of the '''Order and Position Tracker''']] window,
 
* The '''order''' should be '''visible''' in the [[Order and Position Tracker#Orders Tab| '''Orders tab''' of the '''Order and Position Tracker''']] window,
 
* '''[[Symbol Mapping]]''' should be configured correctly.
 
* '''[[Symbol Mapping]]''' should be configured correctly.
Line 15: Line 15:
 
===Applying signals===
 
===Applying signals===
  
Please make sure you have applied at least 1 signal to chart and it is turned on to make backtesting or auto-trading possible:
+
Please make sure you have applied at least 1 signal to the chart and it is turned on to make backtesting or auto-trading possible:
# '''Right-Click''' on chart,
+
# '''Right-сlick''' on the chart,
 
# '''Format Signals''':
 
# '''Format Signals''':
 
#* If '''Format Signals''' is grayed out, it means no signals are currently applied to the chart to generate orders. [[Using Studies#Inserting Studies| '''Add signals''']] to the chart.
 
#* If '''Format Signals''' is grayed out, it means no signals are currently applied to the chart to generate orders. [[Using Studies#Inserting Studies| '''Add signals''']] to the chart.
#* If '''Format Signals''' is available, click it to see the list of applied signals to the chart. Make sure at least 1 signal [[Using Studies#Turning Studies Off and On| '''is ON''']].
+
#* If '''Format Signals''' is available, click it to see the list of signals applied to the chart. Make sure at least 1 signal [[Using Studies#Turning Studies Off and On| '''is ON''']].
 
# Click '''OK'''.
 
# Click '''OK'''.
  
<div style="background-color: #E3FBE5;">'''Note''': '''if a signal is applied successfully it doesn't mean it should show you orders anyway'''. Please [[Why chart shows no trades#Strategy is applied and calculated, but no orders are shown on chart| read this passage]].</div>
+
<div style="background-color: #E3FBE5;">'''Note''': '''if a signal is applied successfully, this does not mean it should display orders'''. Please [[Why chart shows no trades#Strategy is applied and calculated, but no orders are shown on chart| read this passage]].</div>
 
<br>
 
<br>
  
 
==="Error", "No" or "Unverified" for a signal in the Status in Format Signals window===  
 
==="Error", "No" or "Unverified" for a signal in the Status in Format Signals window===  
  
Follow the next steps exactly as they are described:
+
Follow these steps exactly as they are described:
# '''Close''' all MultiCharts parts and make sure all [[MultiCharts Processes]] are ended in Windows Task Manager,
+
# '''Close''' all MultiCharts parts and make sure all [[MultiCharts Processes]] are ended in the Windows Task Manager,
 
# Launch only MultiCharts,
 
# Launch only MultiCharts,
 
# '''Open''' the workspace where the problematic signals are applied to charts,
 
# '''Open''' the workspace where the problematic signals are applied to charts,
 
# '''File''' -> '''New''' -> '''PowerLanguage Editor''',
 
# '''File''' -> '''New''' -> '''PowerLanguage Editor''',
 
# PowerLanguage Editor: '''File''' -> '''Open''' -> '''select''' your signal -> '''Ok''',
 
# PowerLanguage Editor: '''File''' -> '''Open''' -> '''select''' your signal -> '''Ok''',
# Click '''Compile''' button (if it is grayed out, add a space anywhere to the script of the opened signal and then click Compile button),
+
# Click the '''Compile''' button (if it is grayed out, add a space anywhere to the script of the opened signal and then click the Compile button),
 
#* If it is not compiled, debug the script,
 
#* If it is not compiled, debug the script,
 
#* If it is compiled successfully, go back to MultiCharts,
 
#* If it is compiled successfully, go back to MultiCharts,
# MultiCharts: '''right-click''' on the chart, where the signal is applied to,
+
# MultiCharts: '''right-click''' on the chart the signal is applied to,
 
# '''Format Signals''',
 
# '''Format Signals''',
 
# '''Select''' the signal,
 
# '''Select''' the signal,
# Turn it off first by clicking on '''Status''' button,
+
# Turn it off first by clicking on the '''Status''' button,
# Turn it on by clicking on '''Status''' button again.
+
# Turn it on by clicking on the '''Status''' button again.
  
 
<div style="background-color: #E3FBE5;">'''Note''': If it still shows "Error", "No" or "Unverified", please [http://www.multicharts.com/support/contact/| contact our support team].</div>
 
<div style="background-color: #E3FBE5;">'''Note''': If it still shows "Error", "No" or "Unverified", please [http://www.multicharts.com/support/contact/| contact our support team].</div>
 
<br>
 
<br>
===Strategy is constantly "calculating" in status line===
 
  
Each signal code requires at least 1 bar to be calculated on it before it can place an order. For signals, the number of bars a code should be calculated on before it can place an order is defined by [[Strategy Properties#Setting Maximum Bars Back| Maximum number of bars a study will reference (MaxBarsBack) in Strategy Properties]]. The indication that the MaxBarsBack value or the number of bars on chart should be changed is '''calculating...''' in the Status Line of the chart. In order to see this, make sure your Status Line is configured correctly:
+
===Strategy is constantly "calculating" in the status line===
# '''Right-Click''' on the chart,
+
 
 +
Each signal code requires at least 1 bar to be calculated on it before it can place an order. For signals, the number of bars a code should be calculated on before it can place an order is defined by the [[Strategy Properties#Setting Maximum Bars Back| Maximum number of bars a study will reference (MaxBarsBack) in Strategy Properties]]. If you have an incorrect MaxBarsBack value, you will see '''calculating...''' in the Status Line of the chart, and therefore you need to change this value. In order to see this, make sure your Status Line is configured correctly:
 +
# '''Right-click''' on the chart,
 
# '''Format Window''',
 
# '''Format Window''',
 
# '''Status Line''' tab,
 
# '''Status Line''' tab,
# Make sure '''Enable Status Line''' box is checked,
+
# Make sure the '''Enable Status Line''' box is checked,
# Scroll down the list of items for status line and make sure the '''Study''' box is checked,
+
# Scroll down the list of items for the status line and make sure the '''Study''' box is checked,
 
# Click '''OK'''.
 
# Click '''OK'''.
<div style="background-color: #E3FBE5;">'''Note''': If there is no '''calculating...''' in the status line after that, this is not the reason of the absence of strategy-generated orders on chart.</div>
+
<div style="background-color: #E3FBE5;">'''Note''': If there is no '''calculating...''' in the status line after that, this is not the reason for the absence of strategy-generated orders on the chart.</div>
 
<br>
 
<br>
  
===Strategy is applied and calculated, but no orders are shown on chart===
+
===Strategy is applied and calculated, but no orders are shown on the chart===
  
If there is no order on backtested chart, it means either the '''order generation conditions in your code''', or the '''conditions for order execution''' (prices on chart) '''were not met on the chart'''. The same is '''true''' also for '''real-time script calculation''' (so called "forwardtesting") and '''auto-trading'''.
+
If there is no order on a backtested chart, it means either the '''order generation conditions in your code''', or the '''conditions for order execution''' (prices on chart) '''were not met on the chart'''. The same is '''true''' also for '''real-time script calculation''' (so-called "forward testing") and '''auto-trading'''.
Please [[Why an Order Was or Was Not Executed| '''read this article''']] in order to learn more and find out how you can trace your order generation and execution from within the code to understand why it doesn't work as expected.
+
Please [[Why an Order Was or Was Not Executed| '''read this article''']] in order to learn more and find out how you can trace your order generation and execution from within the code to understand why it does not work as expected.
<div style="background-color: #E5F6FF;">'''Example''': If standard signals '''Custom Strategy LX''' and '''Custom Strategy SX''' are applied to a chart, there will be no order on chart, because '''LX''' and '''SX''' stand for '''Long Exit''' and '''Short Exit''' respectfully. [[How Scripts Work#Order Execution Priority| If there are no entries, no exit orders can be generated]].</div>
+
<div style="background-color: #E5F6FF;">'''Example''': If standard signals '''Custom Strategy LX''' and '''Custom Strategy SX''' are applied to a chart, there will be no order on a chart, because '''LX''' and '''SX''' stand for '''Long Exit''' and '''Short Exit''' respectfully. [[How Scripts Work#Order Execution Priority| If there are no entries, no exit orders can be generated]].</div>
 
<br>
 
<br>
 
===Auto-trading in SA mode===
 
===Auto-trading in SA mode===
  
The distinguished feature of the [[Auto Trading#Mode Selection| Synchronous mode of auto-trading]] in MultiCharts is that the orders are shown on chart only if they are actually executed and broker returned confirmation of that through broker API. Please check the following:
+
The distinguishing feature of the [[Auto Trading#Mode Selection| Synchronous mode of auto-trading]] in MultiCharts is that the orders are shown on the chart only if they are actually executed and the broker returned a confirmation of it through the broker's API. Please check the following:
* [[Why chart shows no trades#General information| Are the requirements to show orders on chart met?]]
+
* [[Why chart shows no trades#General information|Are the requirements to show orders on the chart met?]]
* [[Why chart shows no trades#Strategy is applied and calculated, but no orders are shown on chart| Should the orders be sent and executed?]]
+
* [[Why chart shows no trades#Strategy is applied and calculated, but no orders are shown on chart|Should the orders be sent and executed?]]
 
<br>
 
<br>
 
==Manual trades or trades placed from other software==
 
==Manual trades or trades placed from other software==
  
In order to see such orders, the same requirements as [[Why chart shows no trades#General information| described in the beginning of the page]] should be fulfilled.  
+
In order to see such orders, the same requirements as [[Why chart shows no trades#General information|described at the beginning of this page]] should be met.  
  
 
[[Category:FAQ]]
 
[[Category:FAQ]]

Latest revision as of 13:32, 24 January 2023

General information

Requirements for an executed-at-broker account order to be displayed on the chart:

Note: These rules do not affect backtested orders, which were not sent to broker. If you are looking for backtested orders, please read further.


Strategy trades

Applying signals

Please make sure you have applied at least 1 signal to the chart and it is turned on to make backtesting or auto-trading possible:

  1. Right-сlick on the chart,
  2. Format Signals:
    • If Format Signals is grayed out, it means no signals are currently applied to the chart to generate orders. Add signals to the chart.
    • If Format Signals is available, click it to see the list of signals applied to the chart. Make sure at least 1 signal is ON.
  3. Click OK.
Note: if a signal is applied successfully, this does not mean it should display orders. Please read this passage.


"Error", "No" or "Unverified" for a signal in the Status in Format Signals window

Follow these steps exactly as they are described:

  1. Close all MultiCharts parts and make sure all MultiCharts Processes are ended in the Windows Task Manager,
  2. Launch only MultiCharts,
  3. Open the workspace where the problematic signals are applied to charts,
  4. File -> New -> PowerLanguage Editor,
  5. PowerLanguage Editor: File -> Open -> select your signal -> Ok,
  6. Click the Compile button (if it is grayed out, add a space anywhere to the script of the opened signal and then click the Compile button),
    • If it is not compiled, debug the script,
    • If it is compiled successfully, go back to MultiCharts,
  7. MultiCharts: right-click on the chart the signal is applied to,
  8. Format Signals,
  9. Select the signal,
  10. Turn it off first by clicking on the Status button,
  11. Turn it on by clicking on the Status button again.
Note: If it still shows "Error", "No" or "Unverified", please contact our support team.


Strategy is constantly "calculating" in the status line

Each signal code requires at least 1 bar to be calculated on it before it can place an order. For signals, the number of bars a code should be calculated on before it can place an order is defined by the Maximum number of bars a study will reference (MaxBarsBack) in Strategy Properties. If you have an incorrect MaxBarsBack value, you will see calculating... in the Status Line of the chart, and therefore you need to change this value. In order to see this, make sure your Status Line is configured correctly:

  1. Right-click on the chart,
  2. Format Window,
  3. Status Line tab,
  4. Make sure the Enable Status Line box is checked,
  5. Scroll down the list of items for the status line and make sure the Study box is checked,
  6. Click OK.
Note: If there is no calculating... in the status line after that, this is not the reason for the absence of strategy-generated orders on the chart.


Strategy is applied and calculated, but no orders are shown on the chart

If there is no order on a backtested chart, it means either the order generation conditions in your code, or the conditions for order execution (prices on chart) were not met on the chart. The same is true also for real-time script calculation (so-called "forward testing") and auto-trading. Please read this article in order to learn more and find out how you can trace your order generation and execution from within the code to understand why it does not work as expected.

Example: If standard signals Custom Strategy LX and Custom Strategy SX are applied to a chart, there will be no order on a chart, because LX and SX stand for Long Exit and Short Exit respectfully. If there are no entries, no exit orders can be generated.


Auto-trading in SA mode

The distinguishing feature of the Synchronous mode of auto-trading in MultiCharts is that the orders are shown on the chart only if they are actually executed and the broker returned a confirmation of it through the broker's API. Please check the following:


Manual trades or trades placed from other software

In order to see such orders, the same requirements as described at the beginning of this page should be met.