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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      63 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      90 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      47 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      105 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      63 views
      0 likes
      Last Post PaulMohn  
      Working...
      X