Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Daily High / Low

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

    Daily High / Low

    Hello

    I'd like to find out what's the easiest way to check whether the current (or any prior) candle has made a new daily high / low.

    Thanks a lot for any suggestions.

    #2
    Hello laocoon,
    You can use the CurrentDayOHL function to determine it. A sample code will be like

    Code:
    if (this.CurrentDayOHL().CurrentHigh[0] > this.CurrentDayOHL().CurrentHigh[1])
    {
    	//do something
    }
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Hello Joydeep,

      Thanks a lot for your reply. That's exactly what I was looking for!

      Thanks again & Regards

      Comment


        #4
        Hello Joydeep,

        I've got a quick follow-up question regarding the Daily High / Low issue:

        How can you make sure that the Current Daily High / Low is a FRESH High / Low, ie not one that has already been reached earlier in the session?

        Example:
        The market makes a Daily High of 977 at 10 AM. It then retreats and hits the 977 level again at 1PM.
        The "this.CurrentDayOHL().CurrentHigh[0]" function will return 977 although it is not a FRESH New Daily High. How can I make sure that this doesn't happen, ie the value should only be returned if it is FRESH (never reached before)?

        Thanks a lot for your reply.

        Comment


          #5
          Hello laocoon,
          The below code itself as i demonstrated earlier should do it.

          Code:
          if (this.CurrentDayOHL().CurrentHigh[0] > this.CurrentDayOHL().CurrentHigh[1])
          {
          	//do something
          }
          JoydeepNinjaTrader Customer Service

          Comment


            #6
            Hello Joydeep,

            That does it indeed, almost too easy!

            Thanks again & have a nice evening.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            607 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            353 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            560 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            561 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X