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