CommentaryEnabled (Reserved Word)

image\trumpet2.gif Disclaimer

This reserved word returns a value of True only when the Analysis Commentary window is open and Commentary has been requested. This allows you to optimize your trading strategies, analysis techniques, and functions for speed, as it allows EasyLanguage to perform commentary-related calculations only when the Analysis Commentary window is open.

CommentaryEnabled

The difference between CommentaryEnabled and AtCommentaryBar is that CommentaryEnabled returns a value of True for ALL bars when the Analysis Commentary window is open, while the AtCommentaryBar returns a value of True only for the bar clicked with the Analysis Commentary pointer.

For example, the following statements calculate a cumulative advance/decline line to be displayed in the Analysis Commentary window:

Example

CommentaryEnabled will return True if the Analysis Commentary Tool has been applied to the chart.

Additional Example

If CommentaryEnabled Then Begin
 If Close
> Close[1] Then
 
 Value1 = Value1 + Volume
 
Else
 
 Value1 = Value1 - Volume;
 
Commentary("The value of the A/D line is: ", Value1);
End
;