Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 terofs, Yesterday, 04:18 PM
      1 response
      22 views
      0 likes
      Last Post terofs
      by terofs
       
      Started by CommonWhale, Today, 09:55 AM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by Gerik, Today, 09:40 AM
      2 responses
      7 views
      0 likes
      Last Post Gerik
      by Gerik
       
      Started by RookieTrader, Today, 09:37 AM
      2 responses
      13 views
      0 likes
      Last Post RookieTrader  
      Started by alifarahani, Today, 09:40 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X