Alert functions are used for both creating alerts and accessing historical alert transactions. Alerts can be created from multiple places in the platform, including charts, order grids, position grids, watchlists, DOMs and T&S, among others. The platform's alert architecture can be used to generate alert messages, play sound effects, trigger alert scripts and generate visual effects, such as coloring grid rows and cells.


Sections


Functions

Function Details


Functions


Name

Description

AlertDisplayMessage(int, C_MessageType, string, string)

Displays a visual message alert.

string AlertMessage(int)

Gets the message of a specified alert.

int AlertMessageCount()

Gets the number of alerts in the alerts log.

long AlertMessageDateTime(int)

Gets the date/time of a specified alert.

int AlertMessageSymbolIndex(int)

Gets the symbol index of a specified alert message.

C_MessageType AlertMessageType(int)

Gets the message type of a specified alert.

AlertPlaySound(string)

Plays a sound alert from a WAV sound file.

AlertSendEmail(string, string)

Sends an email alert to the user, based on the email settings in the Options Window.


Function Details


AlertDisplayMessage(int symbolIndex, C_MessageType alertType, string message, string source)

Displays a visual message alert.


Parameters


Type

Identifier

Description

int

symbolIndex

The alert symbol index (or -1 for none)

C_MessageType

alertType

The alert type

string

message

The alert message

string

source

The alert source


Scripts


TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, TradingStrategy


string AlertMessage(int index)

Gets the message of a specified alert.


Returns


The message of the specified alert.


Parameters


Type

Identifier

Description

int

index

The alert index in the log, where the oldest alert is 0 and the latest alert is AlertCount()-1


Scripts


TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, TradingStrategy


int AlertMessageCount()

Gets the number of alerts in the alerts log.


Returns


The number of alerts in the Desktop alerts log.


Parameters


No Parameters


Scripts


TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, TradingStrategy


long AlertMessageDateTime(int index)

Gets the date/time of a specified alert.


Returns


The date/time of the specified alert.


Parameters


Type

Identifier

Description

int

index

The alert index in the log, where the oldest alert is 0 and the latest alert is AlertCount()-1


Scripts


TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, TradingStrategy


int AlertMessageSymbolIndex(int index)

Gets the symbol index of a specified alert message.


Returns


The symbol index of the specified alert message.


Parameters


Type

Identifier

Description

int

index

The alert index in the log, where the oldest alert is 0 and the latest alert is AlertCount()-1


Scripts


TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, TradingStrategy


C_MessageType AlertMessageType(int index)

Gets the message type of a specified alert.


Returns


The message type of the specified alert.


Parameters


Type

Identifier

Description

int

index

The alert index in the log, where the oldest alert is 0 and the latest alert is AlertCount()-1


Scripts


TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, TradingStrategy


AlertPlaySound(string soundFile)

Plays a sound alert from a WAV sound file.


Parameters


Type

Identifier

Description

string

soundFile

The WAV sound file path


Scripts


TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, TradingStrategy


AlertSendEmail(string subject, string message)

Sends an email alert to the user, based on the email settings in the Options Window.


Parameters


Type

Identifier

Description

string

subject

The email subject

string

message

The email body


Scripts


TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, TradingStrategy