Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator Doesn't Update When Chart is Minimized

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

    Indicator Doesn't Update When Chart is Minimized

    I've created a rather simple indicator that is working fine with the exception to this issue. If I load the indicator on two identical charts at the same time, both charts show the exact same data. However, if I minimize one of two charts, only one chart updates. The image below shows the result. The top chart was visible on my screen at all times, but I had the bottom chart minimized.



    I added a print statement in OnMarketData, and the print statement is not processed when the chart is in a minimized state.

    Code:
    protected override void OnMarketData(MarketDataEventArgs e)
    {
        if (e.MarketDataType!=MarketDataType.Last)
            return;
    
        Print(Time[0].ToString() + " - Indicator is updating");
    }
    What would cause OnMarketData to stop processing my print statement?
    Attached Files

    #2
    Try setting
    IsSuspendedWhileInactive = false;
    in the OnStateChange function.

    It defaults to true.

    Comment


      #3
      Hello toptrader,

      Thanks for your post.

      Please check the code of the indicator, in the OnStateChange() method, in the State.SetDefaults section, do you see the line:

      IsSuspendedWhileInactive = true;

      A chart being minimized would be considered inactive to the indicator.

      To clarify, please see the helpguide section here: http://ninjatrader.com/support/helpG...leinactive.htm

      Comment


        #4
        Looks like that did it. Thanks!!!

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        181 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        334 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        258 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        358 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        187 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X