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