Alert()
Alert()
Definition
Generates a visual/audible alert to display in the Alerts Log window.
- This method can only be called once the State has reached State.Realtime. Calls to this method in any other State will be silently ignored.
- For add-ons, please see the AlertCallback() method.
Method Return Value
This method does not return a value.
Syntax
Alert(string id, Priority priority, string message, string soundLocation, int rearmSeconds, Brush backBrush, Brush foreColor)
Parameters
You can obtain the default NinjaTrader installation directory to access the sounds folder by using NinjaTrader.Core.Globals.InstallDir property. Please see the example below for usage.

