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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      152 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      305 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      244 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      345 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      176 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X