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 argusthome, 03-08-2026, 10:06 AM
    0 responses
    61 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    39 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    21 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    23 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    51 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X