Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Alert only appearing once

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

    Alert only appearing once

    Here's an odd one - I have an alert message in my code as follows:


    Code:
    				if ( condition )
    				{
    					// Generates an alert
    					Alert("myAlert", NinjaTrader.Cbi.Priority.High, "Delta, Tick Divergence", "Alert4.wav", 1, trade.BackColor, trade.TickForeColor);
    					Print("Alerted");
    				}
    What happens is I see plenty of "Alerted" Print statements but I only ever see the first alert.

    See the attached pics. I have the alert within the onMarketData event on a 60 minute chart. Ideally, it would show every alert I trigger.

    Any thoughts on why it only shows the first?

    Thanks

    Pete
    Attached Files

    #2
    Hi Pete, so it would fire again if you reset the Alert window, correct? Have you tried using a unique string id for each alert then?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand

      I tried altering the message so that each message was unique. In the attached pic, the alerts were about 10 mins apart.

      Interestingly - if I reset the alert window, it does indeed show the next alert after the reset but then it won't show a successive alert.

      Pics attached.

      Cheers

      Pete
      Attached Files

      Comment


        #4
        Hi Pete, one thing you could then do is implementing a programmatic reset of the Alert raised:

        BertrandNinjaTrader Customer Service

        Comment


          #5
          Bertrand

          I figured out where I was going wrong. I wasn't assigning a unique id for each alert.

          As soon as I did that, it started working just fine.

          Thanks

          Pete

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by junkone, 04-28-2024, 02:19 PM
          8 responses
          90 views
          1 like
          Last Post brucerobinson  
          Started by mkouitra, 10-23-2021, 04:40 PM
          17 responses
          1,961 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by Vietanhnguyen2hotmailcom, 05-03-2024, 10:29 AM
          4 responses
          29 views
          0 likes
          Last Post Vietanhnguyen2hotmailcom  
          Started by PhillT, 04-19-2024, 02:16 PM
          4 responses
          37 views
          0 likes
          Last Post PhillT
          by PhillT
           
          Started by ageeholdings, 05-01-2024, 05:22 AM
          5 responses
          39 views
          0 likes
          Last Post ageeholdings  
          Working...
          X