Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Determine the BarsAgo or DateTime for the bar that had the lowest (or highest) price

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

    Determine the BarsAgo or DateTime for the bar that had the lowest (or highest) price

    Hi Paul,

    Thanks for this explanation. Is there a way to determine the BarsAgo or DateTime for the bar that had the lowest (or highest) price in the last X bars?

    Thanks,
    Tim






    #2
    Hi Tim, thanks for posting.

    If the future please crate a new topic and link to the old topic you are referencing
    https://ninjatrader.com/support/foru...rs#post1169049

    Your questions has been discussed in the past here:
    https://ninjatrader.com/support/foru...ars#post813083

    Edit:
    I noticed you want to get the barsago value of the minumum bar. You would need to make a custom function that will iterate through x bars and save the minimum value throughout the iteration. Theres an example here on this publicly available link on finding the minimum value in an array:
    In this article we will learn, how to find smallest elements from a list of integers? Given an integer array and we have to find the smallest element among all array elements.


    Kind regards,
    -ChrisL
    Last edited by NinjaTrader_ChrisL; 08-25-2021, 09:12 AM.

    Comment


      #3
      Thanks Chris,

      I'll do that in the future.

      I look forward to learning how to do this!

      -Tim

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      128 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      73 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      116 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      109 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      88 views
      0 likes
      Last Post CarlTrading  
      Working...
      X