How Scripts Work: Difference between revisions
From MultiCharts
→The Maximum number of bars a study will reference (Signals)
Line 104: | Line 104: | ||
When a value of a bar '''N''' bars ago is referenced in a script, the study can only be visualized starting with the '''N + 1''' bar. | When a value of a bar '''N''' bars ago is referenced in a script, the study can only be visualized starting with the '''N + 1''' bar. | ||
The number of previous bars that must be available for a script in order to start performing calculations is called '''Maximum number of bars a study will reference''', or '''MaxBarsBack'''. The '''MaxBarsBack''' value | The number of previous bars that must be available for a script in order to start performing calculations is called '''Maximum number of bars a study will reference''', or '''MaxBarsBack'''. The '''MaxBarsBack''' value for the signals should be set manually. | ||
To select the smallest '''MaxBarsBack ''' value sufficient for a particular strategy, set the value manually to the largest data offset across all signals applied to a given chart. | |||
To select the smallest '''MaxBarsBack '''value sufficient for a particular | |||
Learn more about setting '''MaxBarsBack''' values for [[Strategy_Properties|Signals]] | Learn more about setting '''MaxBarsBack''' values for [[Strategy_Properties|Signals]] | ||
<br> | <br> | ||
=== Order Execution Priority === | === Order Execution Priority === | ||