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.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by habeebft, Today, 07:27 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_ChristopherS  
    Started by AveryFlynn, Today, 04:57 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by Max238, Today, 01:28 AM
    4 responses
    37 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by r68cervera, Today, 05:29 AM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by geddyisodin, Today, 05:20 AM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X