Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question on Alerts

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

    Question on Alerts

    I have several issues with Alerts. I have some basic questions

    1) If Alert 1 with priority Medium is triggered and starts if Alert 2 is then triggered Should
    it interupt and override the already playing ALert 1 which is of lower priority ?

    2) Will the Alert priorities be maintained between Indicators ? Or only within an Indicator ?

    Thanks for any insight.

    #2
    Hello JerryWar,

    Thanks for opening the thread.

    Alerts with a higher priority will be have an audible precedence over an alert of a higher priority. This is best observed by constructing a test that can trigger an alert of a higher priority immediately after the occurrence of an alert of a lower priority.

    Code:
    private int AlertCount = 0;
    protected override void OnBarUpdate()
    {
    	if (Close[0] > Open[0])
    	{
    		Alert("myAlert1", Priority.Medium, "Reached threshold 1", NinjaTrader.Core.Globals.InstallDir+@"\sounds\Alert1.wav", 10, Brushes.Black, Brushes.Yellow);
    		AlertCount++;
    	}
    	
    	if(AlertCount > 0)
    	{
    		Alert("myAlert2", Priority.High, "Reached threshold 2", NinjaTrader.Core.Globals.InstallDir+@"\sounds\Alert2.wav", 10, Brushes.Black, Brushes.Yellow);
    		AlertCount = 0;
    	}
    }
    Using the code above, I can observe in the Playback Connection using Market Replay, that the higher priority alert takes higher precedence over the medium priority alert that triggered just prior.

    Alerts are submitted to the Alerts Log and the priority used is compared between all logs submitted to it. They are not specific to an individual indicator.

    Please let me know if I may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    67 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    150 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    162 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    99 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    286 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X