Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to read Alerts from Alert Windows?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to read Alerts from Alert Windows?

    Anyone got any examples of code on how to read all the alerts, read the message id priority etc.

    #2
    Hello,

    It appears you can find this information using NinjaTrader.NinjaScript.Alert.AlertHistory. Here is an example iterating over the collection:

    Code:
    foreach (KeyValuePair<string, IEnumerable<AlertEventArgs>> baseAlert in NinjaTrader.NinjaScript.Alert.AlertHistory)
    {
    	foreach (AlertEventArgs alertEventArgs in baseAlert.Value)
            {
                 Print("id: " + alertEventArgs.Id + " instrument: " + alertEventArgs.Instrument.FullName);
            }     
    }

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    28 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    17 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    24 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    22 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    137 views
    0 likes
    Last Post SalmaTrader  
    Working...
    X