Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Close [0} gets oldest not newest price

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

    Close [0} gets oldest not newest price

    I did a cut and paste of another indicator but I am not seeing something. For Close[0] it is pulling the oldest close price on the chart and not the most recent.

    What is this blind person missing?

    Attached is the indicator.
    Attached Files

    #2
    The problem is you are using essentially a lookback period of 1 with DrawRay(). To accomodate this you need to ensure there is at least 1 bar on the chart.

    Replace
    Code:
    if (Bars == null)
         return;
    with
    Code:
    if (CurrentBar < 1)
         return;
    Last edited by NinjaTrader_JoshP; 01-10-2008, 02:25 AM.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh

      Bullseye!

      The cut and paste was from a market indicator that used the price ladder update section. oops.

      You have healed the blind to see once again

      Many thanks.

      Cliff

      Comment

      Latest Posts

      Collapse

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