Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Alarm signal triggering Inconsistent

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

    Alarm signal triggering Inconsistent

    I've programmed several strategies to sound an alarm upon certain conditions, but they seem to be inconsistent at best in triggering the alarm when I think they should.

    The condition is supposed to be triggered on the occurrence of a certain number of up or down bars. I've used NBarsUp and NBarsDown, together in the same strategy. In other strategies, I've used just either one or the other.

    For example, if I want to see three bars up and then two down, I use "bars ago = 2" for the first condition and "bars ago = 0" for the second. Since I'm not certain I'm counting bars ago correctly, I've created an alarm trigger that should sound when there's just a single down bar, but that doesn't work either.

    I'm using a demo trading account, but live data -- not simulated. The funny thing is that the alarm has sounded successfully at least once, and I can't for the life of me figure out why it only works for certain programmed strategies and not for others.

    Any suggestions?

    Thanks.

    Eric

    #2
    Hello Eric,

    Thank you for your post.

    Do you have 'calculate on bar close' set to true for all strategies?
    Ray S.NinjaTrader Customer Service

    Comment


      #3
      "Do you have 'calculate on bar close' set to true for all strategies?"

      I usually do. How does this affect it? Should I have this set to true? Thanks. Eric

      Oh, and BTW -- just to test it out, sometimes I'll program the thing to "ring" after two bars, and I'll wait three or four, just to be on the safe side.

      Any suggestions most appreciated. Thanks. E.

      Comment


        #4
        Eric,

        CalculateOnBarClose influences when your strategy actually evaluates your conditions. With it set to true it will evaluate at the end of each bar. With it false it will evaluate at each incoming tick.

        Please take note that alerts and sound playing will only happen in real-time. The best way to test if your strategy should be firing off a sound is to also tell it to draw a dot on your chart. If you see the dot and no sound is played then there is an issue to further look into. If you do not see a dot then your conditions were not evaluated to true and no sound should have been played.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Alarms in real time with external data feed

          Josh, when you say alerts and sounds only happen in real time. Does this apply when I am Connected to "External Data Feed" on a demo account?

          Thanks.

          Eric






          [
          quote=NinjaTrader_Josh;94712]Eric,

          CalculateOnBarClose influences when your strategy actually evaluates your conditions. With it set to true it will evaluate at the end of each bar. With it false it will evaluate at each incoming tick.

          Please take note that alerts and sound playing will only happen in real-time. The best way to test if your strategy should be firing off a sound is to also tell it to draw a dot on your chart. If you see the dot and no sound is played then there is an issue to further look into. If you do not see a dot then your conditions were not evaluated to true and no sound should have been played.[/quote]

          Comment


            #6
            Real-time is a condition that does not care what connection or account type you are on. Real-time means real-time streaming data and not historical chart data. Let me know if this does not make sense.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            77 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            45 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            27 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            32 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            64 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X