Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

rearm parameter in Alert()

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

    rearm parameter in Alert()

    Hi,

    What exactly does the "rearmSeconds" parameter do in Alert() ?

    I have the following code running on a chart with CalculateOnBarClose = TRUE:

    Alert("enterShort", NinjaTrader.Cbi.Priority.High, alertText, alertFile, 0, Color.White, Color.Black);
    If I set the rearm = 0, does that mean the "enterShort" alert will only fire once for the whole chart, or only once per bar (i.e. per run-through of OnBarUpdate())?

    Thanks.

    -Nick

    #2
    Hi Nick,

    Thank you for your post.

    Correct, with the rearm set to 0, the alert will never reset and only trigger once.

    If you were to set the rearm to 5, the alert will reset after 5 seconds so that it can be triggered. However, with CalculateOnBarClose set to true, this alert will not happen again on the same bar.

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Hi Cal,

      If I were to leave rearmSeconds = 0, but place ResetAlerts() right after my Alert(), does that mean the Alert will fire on each occurence?

      -Nick

      Comment


        #4
        If you place the ResetAlert() right after the alert it will essentially rearm the alert and then on the next occurence the alert will trigger.
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        597 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        343 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        556 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        555 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X