Alert()
<< Click to Display Table of Contents >> Alert() |
Generates a visual/audible alert to display in the Alerts Log window.
Notes: 1. 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. 2. For add-ons, please see the AlertCallback() method |
This method does not return a value
id |
A string representing a unique id for the alert |
priority |
Sets the precedence of the alert in relation to other alerts
Possible values include: Priority.Low Priority.Medium |
message |
A string representing the Alert message |
soundLocation |
A string representing the absolute file path of the .wav file to play |
rearmSeconds |
An int which sets the number of seconds an alert rearms. Note: If the same alert (identified by the id parameter) is called within a time window of the time of last alert + rearmSeconds, the alert will be ignored |
backBrush |
Sets the background color of the Alerts window row for this alert when triggered (reference) |
foreBrush |
Sets the foreground color of the Alerts window row for this alert when triggered (reference) |
Tip: 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. |
protected override void OnBarUpdate() |