Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Hidden Gaps Indicator - Problem

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

    Hidden Gaps Indicator - Problem

    Hello everyone,

    I am trying to develop an indicator for NT8 which will show the gaps between the first and the third bars (between high and low). If there is a gap, a rectangle will be drawn (it is very simple). I tested it in the playback connection using only 50 bars, it worked correctly.
    The problem is when I use more than 3 days bars information, after enable the indicator, it gets clogged and frezze the screen, I think that's due to calculation.

    How can I set calculation only for the last "X" bars (for example 100bars), in order to avoid too much calculation, any idea?

    Thanks for your support in advance.

    #2
    Hello SaulP,

    You want to trigger on the last 100 historical bars specifically right?

    if (State == State.Historical && CurrentBar >= Math.Max(0, Count - 102))
    {
    // draw here
    }

    Or if you wanted to write that as a return.

    if (State == State.Historical && CurrentBar < Math.Max(0, Count - 102))
    return;
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Chelsea B., thanks for your support.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      647 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      572 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X