Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Date return

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

    Date return

    hi all - how would i script the following:

    return the date for the highest High or lowest Low for previous n (50) days?

    returning the value is simple using MAX & MIN, however how could i have the actual date returned when the price was achieved

    using Time[(MAX(High, 50)[1])].ToString("dd/MM/yyyy") did give me an CS1502 error

    thanks in advance for your efforts - cheers...

    ...jurgenC

    #2
    jurgen,

    You appear to be on the right track here, however I would suggest using :



    This returns the index of the highest bar. There is also a lowest bar one as well.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      hi Adam - perfect; thanks for the help.

      cheers....

      ...jurgen

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      633 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      364 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      567 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      568 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X