×

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

CheckAlert

808 bytes added, 19:51, 16 January 2012
Created page with "Returns True if the alerts have been turned on in Formatting Studies > Alerts. True/False is returned on the last bar only. For the bars other than the last False is always..."
Returns True if the alerts have been turned on in Formatting Studies > Alerts.
True/False is returned on the last bar only.

For the bars other than the last False is always returned.

==== Usage ====
<syntaxhighlight>
CheckAlert
</syntaxhighlight>

==== Notes ====
* There is a difference between AlertEnabled and CheckAlert. AlertEnabled checks the status on all the bars while CheckAlert does so for the last bar only.
* Alerts are only generated for the last bar.

==== Example ====
The example below shows how CheckAlert can help eliminate redundant calculations on historic bars as well as in cases when alerts are not turned on:

<syntaxhighlight>
If CheckAlert Then Begin
If Volume >= 2 * Average(Volume, 10) Then Alert ("Volume is going up");
End;
</syntaxhighlight>

[[Category:Alerts]]