• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 SDaCosta30, Today, 04:19 AM
                    1 response
                    10 views
                    0 likes
                    Last Post NinjaTrader_PaulH  
                    Started by memonolog, Today, 02:39 AM
                    3 responses
                    21 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Started by memonolog, Today, 07:07 AM
                    0 responses
                    4 views
                    0 likes
                    Last Post memonolog  
                    Started by juanram, Today, 06:01 AM
                    1 response
                    9 views
                    0 likes
                    Last Post NinjaTrader_PaulH  
                    Started by dastaan, Today, 06:29 AM
                    0 responses
                    8 views
                    0 likes
                    Last Post dastaan
                    by dastaan
                     
                    Working...
                    X