×

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
Open main menu

Changes

Recalculate

662 bytes added, 13:57, 16 May 2012
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..."
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==

<syntaxhighlight>Recalculate;</syntaxhighlight>

==Note==
To avoid infinite looping of the script, use global variables with recalculation conditions.

==Example==

Set the condition for recalculation:

<syntaxhighlight>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;
</syntaxhighlight>

[[Category:Execution Control]]