Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PriorDayOHLC().PriorLow/High

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

    PriorDayOHLC().PriorLow/High

    what could cause the above code to return the wrong value for the prior low/high

    for example i am running the code on BRCM

    for the 10/11 it gives the following values for the prior low / high
    the high is correct but the low is not.
    this is happening regularly

    The prior session low value is 52.29
    The prior session high value is 53.86

    #2
    Hello fiddy,

    Please add the PriorDayOHLC indicator on the same chart that this indicator is added to.

    Take a screenshot showing the values of PriorDayOHLC().PriorHigh[0] or .PriorClose[0] from your script and in the same screenshot show the PriorDayOHLC indicator values on the chart.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      you can see in the chart i have attache on the one label BRCM PriorOHLC that the low for the 11/9 is given as 52.79

      then when you look at the low on the daily chart for the same day in the other picture the low (blue line) is at 52.41. this matches up with other data sources i have checked
      Attached Files

      Comment


        #4
        Hello fiddy,

        I'm looking for your indicator added to the same chart that the PriorDayOHLC indicator is on.

        What is the name of your indicator, where are the values of your indicator on the chart that has the PriorDayOHLC indicator on it?

        Also, set the PriorDayOHLC indicator to have AutoScale True so that we can get all values made by the indicator visible in the screenshot.

        Last, was is the code you are calling in your script to place this plot? (Are you printing the values of the PriorDayOHLC().PriorHigh[0] in your script to the output window?)
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          what indicator are you refering to ?
          i am just going by what is in the output window from my strategy code.

          Below is the code - i have kept it basic to try to find what was is causing the dicrepancy but i have not been able to find the answer myself

          if (Bars.FirstBarOfSession)
          {
          // Condition set 1
          if (myLongEntryOrder == null
          && PriorDayOHLC().PriorClose[0] > PriorDayOHLC().PriorOpen[0])

          {
          double lowvalue = PriorDayOHLC().PriorLow[0];
          double highvalue = PriorDayOHLC().PriorHigh[0];
          Print("The prior session low value is " + lowvalue.ToString());
          Print("The prior session high value is " + highvalue.ToString() );

          Comment


            #6
            i have attached the OHLC - on this minute chart it says the low is 52.29
            however on the daily the chart is 52,41

            i have raised this before as an issue in other topic
            how can the data from the minute chart not match the data from the daily chart - on the same chart??
            Attached Files

            Comment


              #7
              Hello fiddy,

              Is the horizontal blue line from your indicator? Is this being plotted at the Close of the PriorDay?

              It appears that the blue line is covering the PriorClose line made by the PriorDayOHLC indicator and it does appear that is plotting correctly.

              However, without your script printing a value that can be compared to a visible close on the chart, I would not be able to say for sure. I can say that it appears that way, but without being able to see actual values to compare I am not certain.

              If you feel that your indicator is not giving the same value as the PriorDayOHLC indicator on the same chart, please open the Data box so that we can see all of the values of the PriorDayOHLC.


              Regarding comparing a minute chart to daily chart, the PriorDayOHLC does not work on a daily time frame. Try adding the PriorDayOHLC directly to a daily chart. You will a message appear that says "PriorDayOHLC only works on intraday intervals". The same is true in code. Do not use the PriorDayOHLC on a daily time frame. Instead of using PriorDayOHLC, just use Close[1]. The Close[1] is the close of the previous bar. Thats yesterdays close.

              Also, Daily bars use a different session template than minute bars depending on who you are connecting to for data.
              With NinjaTrader Continuum daily bars use the RTH session template and cannot be changed. For the most part you cannot change the session template of a daily bar.
              With minute bars, the session template will be ETH.
              Try loading a 1440 minute chart (this is basically a daily chart using minute bars). This would use the same session template as any other minute chart.
              A different session template means different open and close times meaning a different open, high, low, and close for the session.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                the blue line i have drawn on the chart at the low of the daily chart just so that you can see the approximate value visually

                the two values are not the same - they are different - the low on daily is 52.41 where as the minute chart is showing the prior OHLC as 52.29

                i am using the code on minute time frame - but you dont seem to understand the problem.
                the code using the prior OHLC is saying the low is 52.29
                so i am getting triggers when i shouldnt be as the correct low according to the daily chart and other data sources is 52.41.

                how can i fix this

                Comment


                  #9
                  Hello fiddy,

                  It is expected that a daily interval and a minute interval are going to have different open high low and closes for the session.

                  Do not use PriorDayOHLC on a daily time frame. This indicator does not work on a daily chart. Do not call PriorDayOHLC from another indicator that is using a daily time frame.

                  Try adding the PriorDayOHLC to a daily chart, it doesn't work.

                  From my previous post:
                  "Daily bars use a different session template than minute bars depending on who you are connecting to for data.
                  With NinjaTrader Continuum daily bars use the RTH session template and cannot be changed. For the most part you cannot change the session template of a daily bar.
                  With minute bars, the session template will be ETH.
                  Try loading a 1440 minute chart (this is basically a daily chart using minute bars). This would use the same session template as any other minute chart.
                  A different session template means different open and close times meaning a different open, high, low, and close for the session."
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    why is it expected that the daily interval and minute interval will have differnt OHLC

                    surely the open and closing times of the mkt are universally standard and the price data btw those time is the same.'

                    This is extremely frustrating that some that seems so straight forward be so complicated

                    Comment


                      #11
                      i guess the daily bar "problem" is also why the volume indactor is not 100% accurate.

                      Comment


                        #12
                        Originally posted by fiddy View Post
                        why is it expected that the daily interval and minute interval will have differnt OHLC

                        surely the open and closing times of the mkt are universally standard and the price data btw those time is the same.'

                        This is extremely frustrating that some that seems so straight forward be so complicated
                        This is due to the Session as provided by the data provider. Some providers may use RTH for the session versus ETH.
                        You can adjust the 1440 Minute chart by right clicking and selecting Data Series > then change the Session Template to an ETH or RTH equivalent of the respective market.
                        For information on Session Templates please visit the following link: http://ninjatrader.com/support/helpG...on_manager.htm

                        Comment


                          #13
                          Patrick - if you select RTH as the chart template and the daily low is 54.41 then why isnt the low
                          the same when u change the time interval on the same chart to minutes. The template is the same?? why would the data be the same for the same time period?

                          Comment


                            #14
                            Hello fiddy,

                            The provider may supply the daily data as RTH or ETH. Who is your data provider?

                            Comment


                              #15
                              Kinetick is the supplier

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              663 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              376 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              110 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              575 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              580 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X