Name | Type | Discription |
---|---|---|
Date | Date alert was created | |
Date | Date alert was hit | |
Single | Value that violated alert level | |
Boolean | Is alert set to "<= At or Below" | |
Boolean | Is alert a New Signal alert | |
Boolean | Is alert a Regular alert | |
Boolean | Is alert a Trendline Alert | |
Boolean | Is alert set to ">= At or Above" | |
Single | Alert Level | |
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