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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        134 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        75 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        119 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        114 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        90 views
        0 likes
        Last Post CarlTrading  
        Working...
        X