RecalcLastBarAfter: Difference between revisions
From MultiCharts
no edit summary
No edit summary |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
Initializes the calculation after expiration of the timeout, set in seconds. | Initializes the calculation after expiration of the timeout, set in seconds. | ||
<div style="background-color: #E3FBE5;">'''Note''': The maximum recalculation frequency is 100 milliseconds (0.1 sec).</div> | |||
RecalcLastBarAfter is used for the slow markets in which new ticks come in infrequently. Normally, calculation of the studies is performed in events when the immediate tick has come to a chart. | RecalcLastBarAfter is used for the slow markets in which new ticks come in infrequently. Normally, calculation of the studies is performed in events when the immediate tick has come to a chart. | ||
Line 7: | Line 8: | ||
When the tick has been received before timeout expiration, time counter is reset and countdown for RecalcLastBarAfter(Timeout) starts anew. | When the tick has been received before timeout expiration, time counter is reset and countdown for RecalcLastBarAfter(Timeout) starts anew. | ||
== Usage == | |||
<syntaxhighlight>RecalcLastBarAfter(Timeout)</syntaxhighlight> | <syntaxhighlight>RecalcLastBarAfter(Timeout)</syntaxhighlight> | ||
Where: | Where: | ||
:'''Timeout''' - the number of seconds. | |||
== Example == | == Example == | ||
Line 37: | Line 40: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Also note that in this example the RecalcLastBarAfter statement is only active if the condition returns true, meaning that if the current bar isn't the | Also note that in this example the RecalcLastBarAfter statement is only active if the condition returns true, meaning that if the current bar isn't the LastBarOnChart, the RecalcLastBarAfter statement is not executed. | ||
[[Category:Execution Control]] | [[Category:Execution Control]] |