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