RecalcPersist

From MultiCharts
Jump to: navigation, search

Used in variable declaration statements, before a variable name, to specify that the value of the variable is to be updated on every tick and the latest value of this variable is to be saved after the study recalculation.

Usage

Declaration:[RecalcPersist]Name(InitialValue1)

Where: (BarsBack) - numerical expression, specifying the number of bars back

Note

  • This keyword can be used only with variables.
  • The variable with such an attribute cannot be serial type.

Example

Declare Max as a numerical value, updated on every tick, with initial value of 100.

After study recalculation, the latest value of Max will be saved:

Variable:[RecalcPersist] Max(100);

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