Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to check if Alert Log > ID exists

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

    How to check if Alert Log > ID exists

    How do you check if an Alert() ID already exists? https://ninjatrader.com/support/help.../nt8/alert.htm
    I'm trying to prevent multiple entries being created in the Alerts Log window when the chart is reloaded by checking the list of existing ID's.

    #2
    I don't think you can.

    If you set rearmSeconds high enough, I dunno, say 5 or 15 seconds,
    does that do anything to help? Have you tried this?

    Multiple entries in the Alerts window using the same Id is a feature.
    That is, the Alert() method expects each Alert to use the same Id,
    that's how rearmSeconds works.

    If you have 10 different calls to Alert(), each call should have it's own
    unique string Id, but still, each string Id is supposed to be a constant
    string value -- again, that's how Alert knows to wait the duration
    specified by rearmSeconds -- any call to Alert() inside the unarmed
    period would be ignored.

    If you're seeing too many, I presume the only recourse is to redesign
    your criteria or employ a higher rearmSeconds value.

    Comment


      #3
      Hello zacharydw00,

      Unfortunately, I am not aware of a public collection of the triggered alerts (or their IDs) that be accessed from NinjaScript.

      bltdavid is providing good information. Setting the frequency the Alert can be triggered by setting the Re-arm seconds would be the supported functionality.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Thanks guys, will try.
        I though 'rearmSeconds' was for audio only, but I see that is not specifically stated.

        Comment


          #5
          Hello zacharydw00,

          That is correct. The Re-arm seconds applies to the alert, whether or not a sound file location path string is provided.
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          648 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          369 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          108 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          572 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          573 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X