Alert Object | Nirvana Systems Inc.

Alert Object

Alert Object

Name

Type

Discription

DateCreated

Date

Date alert was created

DateHit

Date

Date alert was hit

HitValue

Single

Value that violated alert level

IsLowerLimit

Boolean

Is alert set to "<= At or Below"

IsNewSignalAlert

Boolean

Is alert a New Signal alert

IsRegularAlert

Boolean

Is alert a Regular alert

IsTrendLineAlert

Boolean

Is alert a Trendline Alert

IsUpperLimit

Boolean

Is alert set to ">= At or Above"

LimitValue

Single

Alert Level

TimeFrame

String

Timeframe alert fired on

To interact with an Alert object you need to first hook or trap the Alert event. This is done by using the OmniPilot.OnAlert method and passing in the address of the method that contains the code you want to execute when an alert fires. The fired AlertObject and the SymbolObject the alert fired on will be passed into your calling method.

Example
Sub OnStartUp
StartOT
OmniPilot.OnAlert(AddressOf MyOnAlert)
End Sub

Private Sub MyOnAlert(ByVal oSymbol As SymbolObject, ByVal oAlert As AlertObject)
' Actions to take when an alert fires. Here you will have access to the SymbolObject that the alert fired on as well as the
AlertObject itself
End Sub

Also See
Events
Events.OnAlert

>