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 f.saeidi, Today, 11:02 AM
    1 response
    1 view
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by geotrades1, Today, 10:02 AM
    4 responses
    12 views
    0 likes
    Last Post geotrades1  
    Started by rajendrasubedi2023, Today, 09:50 AM
    3 responses
    15 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by lorem, Today, 09:18 AM
    2 responses
    11 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by geddyisodin, Today, 05:20 AM
    4 responses
    30 views
    0 likes
    Last Post geddyisodin  
    Working...
    X