×

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

Changes

Jump to navigation Jump to search
=== Synchronous Mode ===
In SA mode at the moment you click the button to toggle automaton on, the starting point of order generation on the chart A is shifted from the beginning of the chart to the bar that previous to current bar and the strategy is recalculated. Meanwhile, if you create the identical chart B nearby to see the strategy calculating in real-time (forward-testing) and you expect to see at least the first order triggered at the same bar at the same time as on chart A, you should perform some calculation to find out the correct data range setting for chart B in order to have the same starting points of order generation for strategies on both charts. If starting points are different, the results are also different.
<div style="background-color: #E3FBE5;">'''Example 1''': Let's say a signal applied to chart A contains only 1 line: '''buy next bar at close-15 limit;''' and the MaxBarsBack is set to '''50'''. It means script will be be calculated only at close bar # '''51''' to place the guaranteed to be executed '''buy limit''' at open of bar, that is bar # '''52''', when the chart is created and the script is applied. Assume that this is a '''1 minute''' chart, the current bar # is '''122''' and its time (closing time of the bar) is '''11:02'''. Current bar is not closed yet, so the script cannot be calculated on the current bar. You enable automated execution by clicking on SA button. The order executed historically on bar # 52 is wiped from from the chart and the script is recalculated. The first calculation of the script takes place at the bar that is previous to current (not yet closed) bar, so the first calculation of the script takes place and the bar # '''121''' (bar time = '''11:01''') to place the guaranteed to be executed '''buy limit''' at open of bar, that is bar # '''122''' (current not yet closed bar with time = '''11:02'''). To emulate the same situation on another chart B you will need to create identical chart right after you enable automated exectuion on chart A, but the bar # '''1''' of the char B should be the bar with time = '''10:10''' ('''11:02 (bar # 122) - 1 ''(the bar that is previous to the current bar, where the script was calculated for the first time to generate the order on chart A)'' - 50 (MaxBarsBack) - 1 (current bar)'''. In other words, the bar # '''121''' on chart A and the bar '''51''' on chart B should be the same bar ('''10:10''').</div>
<div style="background-color: #E3FBE5;">'''Note 1''': The opening tick of the current bar is already passed, so the order execution prices will differ on the charts.</div>
<div style="background-color: #E3FBE5;">'''Note 2''': Example is valid for price orders only. It will work differently for market orders.</div>

Navigation menu