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
    BertrandNinjaTrader Customer Service

    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?
        BertrandNinjaTrader Customer Service

        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 ybhx0315, Today, 09:06 PM
                    0 responses
                    1 view
                    0 likes
                    Last Post ybhx0315  
                    Started by parkinsonbr, Today, 08:23 PM
                    0 responses
                    3 views
                    0 likes
                    Last Post parkinsonbr  
                    Started by jc.am, Today, 07:59 PM
                    0 responses
                    3 views
                    0 likes
                    Last Post jc.am
                    by jc.am
                     
                    Started by i2w8am9ii2, Today, 04:36 PM
                    2 responses
                    13 views
                    0 likes
                    Last Post i2w8am9ii2  
                    Started by WeyldFalcon, Today, 02:07 PM
                    2 responses
                    15 views
                    0 likes
                    Last Post WeyldFalcon  
                    Working...
                    X