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 timko, Today, 06:45 AM
      2 responses
      12 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by habeebft, Today, 07:27 AM
      0 responses
      4 views
      0 likes
      Last Post habeebft  
      Started by Tim-c, Today, 03:54 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by rocketman7, Today, 01:00 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by wzgy0920, 04-23-2024, 09:53 PM
      3 responses
      76 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Working...
      X