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 kinfxhk, 07-14-2026, 09:39 AM
      0 responses
      127 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      105 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      85 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      105 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      85 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X