Recalculate
Jump to navigation
Jump to search
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;
This link has an example of the recalculate command and the RecalcPersist command showing how they work with a fileappend command to show the results. http://www.multicharts.com/discussion/viewtopic.php?f=5&t=10371