Recalculate: Difference between revisions
From MultiCharts
(Created page with "Initializes recalculation of the study. All the variables will be re-initialized. The study will be recalculated from the first bar of the data series. ==Usage== <syntaxhig...") |
(No difference)
|
Revision as of 13:57, 16 May 2012
Initializes recalculation of the study. All the variables will be re-initialized. The study will be recalculated from the first bar of the data series.
Usage
Recalculate;
Note
To avoid infinite looping of the script, use global variables with recalculation conditions.
Example
Set the condition for recalculation:
var: recalcpersist recalc_once(true), vol0(0);
if LastBarOnChart then begin
print("Last bar volume = ", volume);
if recalc_once then begin
print("Recalculate study!");
recalc_once = false;
recalculate;
end;
end;