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 GLFX005, Today, 03:23 AM
      0 responses
      1 view
      0 likes
      Last Post GLFX005
      by GLFX005
       
      Started by XXtrader, Yesterday, 11:30 PM
      2 responses
      11 views
      0 likes
      Last Post XXtrader  
      Started by Waxavi, Today, 02:10 AM
      0 responses
      6 views
      0 likes
      Last Post Waxavi
      by Waxavi
       
      Started by TradeForge, Today, 02:09 AM
      0 responses
      11 views
      0 likes
      Last Post TradeForge  
      Started by Waxavi, Today, 02:00 AM
      0 responses
      2 views
      0 likes
      Last Post Waxavi
      by Waxavi
       
      Working...
      X