BEGINCMTRY: Difference between revisions
From MultiCharts
m
no edit summary
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
The statements between this compiler directive and the reserved word #End are evaluated only when the | The statements between this compiler directive and the reserved word #End are evaluated only when the [[Category:Expert_Commentary|Expert Commentary]] tool is used to select a bar on a chart or a cell in a grid. The reserved word #End must be used with this reserved word. | ||
== Usage == | |||
<syntaxhighlight> | <syntaxhighlight> | ||
#BeginCmtry | #BeginCmtry | ||
Line 8: | Line 8: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Notes == | |||
All statements between the ''#BeginCmtry'' and ''#End'' are ignored, including calculation of MaxBarsBack, unless commentary is generated. | * All statements between the ''#BeginCmtry'' and ''#End'' are ignored, including calculation of MaxBarsBack, unless commentary is generated. | ||
== Example == | |||
An indicator that calculates the 10-bar momentum of the closing price needs ten bars in order to start plotting results. If commentary is added to this indicator and the commentary uses a 50-bar average of the volume, then the MaxBarsBack setting is increased to fifty. However, the 50-bar average is only used for the commentary, so there is no need to have the indicator wait fifty bars before giving results unless Commentary is requested. | An indicator that calculates the 10-bar momentum of the closing price needs ten bars in order to start plotting results. If commentary is added to this indicator and the commentary uses a 50-bar average of the volume, then the MaxBarsBack setting is increased to fifty. However, the 50-bar average is only used for the commentary, so there is no need to have the indicator wait fifty bars before giving results unless Commentary is requested. | ||