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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      72 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      152 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X