Alert (Reserved Word)

image\trumpet2.gif Disclaimer

This reserved word triggers an alert and enables you to provide a description of the conditions that triggered the alert and an optional symbol.

Alert("AlertString") ;

AlertString is any user-defined text description string (256 character max). You use the text string to provide information about the alert such as the market conditions that triggered it. This text string appears in the Additional Info field of the Alert Notification dialog box and in the Message Center. A description does not have to be provided, in which case the Additional Info field in the Alert Notification dialog box and the description for the alert entry in the Message Center are left blank.

Alert("AlertString","SymbolString") ;

In addition to the AlertString (see above), the symbol string will appear in the Symbol column of the TradeStation Message Center window and in the Alert pop-up window.

Remarks

  • A True value for Alert will only generate an alert when alerts have been enabled for the study in the Properties tab.
  • Alerts are only generated for the last bar.
  • Alert strings may be no more than 256 characters or they will be truncated.
  • An alert may only included in a study (indicator, ShowMe, PaintBar, ActivityBar) or a TradingApp. Alerts are not supported in strategies.

Example

If you include more than one Alert statement in your indicator or study, and more than one alert is triggered, the description included with the last alert triggered is the description shown. For example, assume the following indicator is applied to a price chart:

Plot1(Average(Close, 10), "Avg");
If Close Crosses Over Plot1 Then
 Alert
("Price crossed over average");
If
Volume > Average(Volume,10) Then
 Alert
("Volume Alert");

If on the last bar of the price chart both conditions are true, both alerts are evaluated. In this case, only one alert is actually triggered and logged, and it will have the last description, which in the above example is the alert with the description "Volume Alert".