Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator Alert sounds being played only on the active tab

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

    Indicator Alert sounds being played only on the active tab

    I'm trying to debug an indicator (TS Super Trend) that I found on this site.. I know you don't support 3rd party indicators.. so I'm not asking for anyone to look at the code, rather I'm just curious if you might be able to point me in the right direction.

    It has a weird problem when the alert is set (it plays a noise).. but it only seems to play the noise when the alert condition happens on the foreground tab.

    However, if at some time in the past the alert condition was met on background tabs, you will hear this sound when you switch to that tab.

    Do you know what could cause such a problem? Maybe the code is checking for the alert condition in the wrong ninjascript event ?

    #2
    Hello NinjaCustomer,

    Thanks for your post.

    From your observation description, it sounds like the indicator has the setting of IsSuspendedWhileInactive set to true in the OnStateChange() method.

    The definition of IsSuspendedWhileInactive is: Prevents OnBarUpdate from being raised while the indicators display is not in use. Enabling this property in your indicator helps save CPU cycles while the indicator is suspended and not in use by a user. Once the indicator is in a state that would no longer be considered suspended, the historical OnBarUpdate() events will be triggered allowing the indicator to catch up to current real-time values. Reference: https://ninjatrader.com/support/help...leinactive.htm

    Change the setting to false.

    Comment


      #3
      yes, it is true.. ok i'll try it thx

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      576 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X