Tips - Setting Alarms with Scans

This tip will cover the use of Scans to set Alarms and Alarm levels. See Alarms For additional background information on Scans, click here

There are three different alarms which can be set. The High Alarm, the Low Alarm, and the Volume Alarm. For each alarm, there are two numbers which can be set....the alarm level, and the alarm step value.

In order to turn an alarm on or off, you must set the appropriate bit on or off in the Monitor Flag Token (FLAG). The bits are represented by the following three tokens...

ALARM_GE - represents the bit for the High Alarm (GE stands for Greater than or Equal to)

ALARM_LE - represents the bit for the Low Alarm (LE stands for Less than or Equal to)

ALARM_VOL - represents the bit for the Volume Alarm

Therefore, in order to turn ON the High Alarm for all symbols, you would run the following scan on your ".All Symbols" quotepage...

SET(FLAG, ALARM_GE)

Similarly, to turn OFF all Low Alarms for all symbols, you would run the following scan on your ".All Symbols" quotepage...

SET(FLAG, -ALARM_LE)

The negative sign tells the SET command to turn that bit off.

The tokens that represent the three alarm levels are HIALARM, LOALARM, and VOLALARM. Therefore, in order to set the hi alarm to the current daily high plus 2, you would run the following scan on daily data...

SET(HIALARM, HI + 2)

Similarly, you could set the low alarm level to the low minus 2 with...

SET(LOALARM, LO - 2)

The tokens for the three alarm step values are HISTEP, LOSTEP, and VOSTEP. In order to set the volume alarm step value to 1/8 of the 20 day average volume...you would use the following scan...

SET(VOSTEP, AVGVOL/8)

You are probably going to do several of the above functions in one scan. So in order to turn all the above scans on at once, and at the same time, set the alarm levels and the alarm step values, you might use the following scan...

SET(FLAG, ALARM_GE) AND SET(FLAG, ALARM_LE) AND SET(FLAG, ALARM_VOL) AND SET(HIALARM, HI + 2) AND SET(LOALARM, LO - 2) AND SET(VOLALARM, 2*AVGVOL) AND SET(HISTEP, 0.5) AND SET(LOSTEP, 0.5) AND SET(VOSTEP, AVGVOL/8)

This scan, or any subset of it, can be run at any time to adjust the alarm levels....

If you decide that you have too many alarms going off and would simly like to turn them all off at once, just run the following scan...

SET(FLAG, -ALARM_GE) AND SET(FLAG, -ALARM_LE) AND SET(FLAG, -ALARM_VOL)

For some supplemental information from the web site.....see...

Alarms Feature Scans Tutorial Alarms Quotepage Tutorial