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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        88 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        48 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        30 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        34 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        68 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X