Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

highestHigh, lowestLow

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

    highestHigh, lowestLow

    hello,

    I would like to calculate the highest and the lowest in a slice of time.
    I use this formula.

    startDateTime = new DateTime(Time[0].Year, Time[0].Month, Time[0].Day, StartHour, StartMinute, 0);
    endDateTime = new DateTime(Time[0].Year, Time[0].Month, Time[0].Day, EndHour, EndMinute, 0);
    int startBarsAgo = GetBar(startDateTime);
    int endBarsAgo = GetBar(endDateTime);

    Now, if I set the property default graphic, "session beguins" = 00, session ends "= 00, i use

    double highestHigh = MAX(High, startBarsAgo - endBarsAgo)[endBarsAgo];
    double lowestLow = MIN(Low, startBarsAgo - endBarsAgo)[endBarsAgo];

    it works

    But, if I set the property graphic, "session beguins" = 08, session ends "= 22, French Local Time

    I must use this formula so that it works

    double highestHigh = MAX(High, (startBarsAgo+1) - endBarsAgo)[endBarsAgo];
    double lowestLow = MIN(Low, (startBarsAgo+1) - endBarsAgo)[endBarsAgo];

    can you help me understand

    thank you


    #2
    Hi hegh2000, different session settings may produce different results as data may not be available for proper reference. For an example how get a high / low value for a given time range, please check this link - http://www.ninjatrader-support2.com/...ead.php?t=8600

    Comment


      #3
      is exactly the indicator I use.

      Comment


        #4
        Ok - when I use this for example on a 7500 vol ES chart with inputs of 9:30 to 10:30 (based on MST times on a 24 hr session chart), then the indicator marks correctly the 864.50 low level as well as the 869.50 high level. What inputs do you use in the indicator?

        Comment


          #5
          1. 00h00/ 00h00
          2. 8h00-22h00

          you also notice that if properties are default, I have a pseudo candle at the start
          Attached Files

          Comment


            #6
            hegh2000,

            I do not follow. The screenshots are showing the indicator works exactly as it should. Your parameters are telling the indicator to run from 8AM to 9AM. It marks out exactly the highs/lows from that time frame.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              1. Low = 3087
              2. Low = 3097.50

              Comment


                #8
                Not sure what you are referring to. If you look at the screenshots you posted all of the high/lows are accurate as determined by your indicator parameters of 8AM to 9AM.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  on the second chart, the candle from 8.00 is not taken into account

                  Comment


                    #10
                    I cannot discern anything with your chart being so small. Please use the data box to check the time stamps.
                    Josh P.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    578 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    334 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    101 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    554 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    551 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X