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 CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    24 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-25-2026, 09:53 PM
    0 responses
    30 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 03-25-2026, 09:51 PM
    0 responses
    18 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 03-23-2026, 11:13 AM
    0 responses
    27 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X