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

HighestBar() LowestBar()

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

    HighestBar() LowestBar()

    Hello,

    Quick question, if there are two or more bars that have the same highest/lowest value over look back number of bars, what bar is returned? It is the most recent bar?

    Thanks,
    Matt

    #2
    Hi Stealth, thanks for writing in. It would return the most recent bar found. To test it, I used a 1 second ES chart where I know there should be a lot of similar values between bars. There was luckily one right at the end of todays data, so I ran a test script:

    if(CurrentBar == Bars.Count-2)
    Print(HighestBar(High, 39));



    Kind regards. ​
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hi Chris,

      Thank you! And, thank you for taking the time to test that. I just figured it might in some "undocumented" documentation.

      Have a great weekend!
      Matt

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by andrewtrades, Today, 04:57 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by chbruno, Today, 04:10 PM
      0 responses
      6 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Started by josh18955, 03-25-2023, 11:16 AM
      6 responses
      436 views
      0 likes
      Last Post Delerium  
      Started by FAQtrader, Today, 03:35 PM
      0 responses
      9 views
      0 likes
      Last Post FAQtrader  
      Started by rocketman7, Today, 09:41 AM
      5 responses
      20 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X