Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Opening and Last Close

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

    #16
    Version 7

    IQ Feed

    Comment


      #17
      Thank you for your patience, Occam.

      I looked at CurrentDayOpen values.

      I was able to get correct values for this in the market analyzer, and saw how incorrect values can be seen.

      The default bars lookback is 50. If you're using 1 minute bars, for example, this won't be enough bars to go back to the beginning of the day and get the correct open.

      The solution here is to increase the lookback period or change the time interval so that there are enough bars loaded to go to the start of the session. You could use 60 minute bars and then should see correct values with lookback = 50. The same principle will apply if you're trying to access current day high or prior day close - You have to ensure enough bars are loaded.

      The SMA should be applied to a daily series. CurrentDayOHL and PriorDayOHLC are intended for intraday series. Please be sure to evaluate these with separate indicators / columns. I was not able to see the issue where it is updated continuously. Let us know if you're still having trouble with this and any specific setup details.
      Last edited by NinjaTrader_RyanM1; 09-09-2010, 03:12 PM.
      Ryan M.NinjaTrader Customer Service

      Comment


        #18
        Ok,

        How do I set the bars so that they are daily or 60 min as you suggest? Both in the Market Analyzer and in code.

        I see how to change look back in the Market Analyzer, is that the control point for the underlying code as well or do I need to alter the code also?

        Comment


          #19
          Hi Occam,

          This is set when you create/edit the column. You can right Click > Columns to adjust this. For each column you can select the data series interval that is used to calculate the indicators.

          You don't set this within the code. It's all done within market analyzer settings.
          Ryan M.NinjaTrader Customer Service

          Comment


            #20
            Ok, so I Click>Columns then what. How do I set the interval.

            Comment


              #21
              Hello Ocam,

              Please see here for adding columns in the market analyzer:


              Let us know if you have any additional questions.
              Ryan M.NinjaTrader Customer Service

              Comment


                #22
                Do I set Data Series/Type to 'Day' to put everything on daily data?

                Comment


                  #23
                  Correct, when you add an indicator choose the 'Day' interval for calculating it on daily data.

                  Comment


                    #24
                    Ok.

                    So with the free end of day data and my column set to Data series/Type = Day my

                    1. SMA[0] will be based on daily bars and
                    2. PriorDayOHLC & CurrentDayOHL

                    will be available?

                    Comment


                      #25
                      Hello Occam,

                      Yes, you can set SMA to daily intervals on the market analyzer.

                      CurrentDayOHL and PriorDayyOHLC requires intraday data, and unfortunately this is not available with Kinetick free end of day.
                      Ryan M.NinjaTrader Customer Service

                      Comment


                        #26
                        Ok, subscribed to intra day.

                        Add column Indicator Set Data series/Type = Day

                        Add a line in code
                        Print(CurrentDayOHL().CurrentOpen[0].ToString());

                        Check the output and I see a number that keeps changing and is not equal to the open??

                        So how I get today's open?
                        Last edited by occam; 09-29-2010, 12:57 PM.

                        Comment


                          #27
                          You would want to apply CurrentDayOHL to an intraday ( < daily) series.
                          Ryan M.NinjaTrader Customer Service

                          Comment


                            #28
                            Originally posted by NinjaTrader_RyanM View Post
                            You would want to apply CurrentDayOHL to an intraday ( < daily) series.

                            I'm not sure where to post this but I have an issue with setting the bar calculation mode. I am wanting to apply the typical or median price calculation to an obv indicator on a tick chart, but when I swap out the different calculation options, open, close. median, typical etc, there is no change in the line graph, they are all the same. Why doesn't it work? Thanks

                            Comment


                              #29
                              Hello syxforex,

                              It depends how the indicator is setup. The default OBV for example, is hard coded to use Close values.

                              You can make changes to this indicator to allow price input.

                              Click Tools > Edit NinjaScript > Indicator > Open OBV.
                              Save a copy by Right Clicking > Save as.

                              Add this line to Initialize():
                              PriceTypeSupported = true;

                              Then, replace any reference to Close with Input
                              Ryan M.NinjaTrader Customer Service

                              Comment


                                #30
                                Originally posted by NinjaTrader_RyanM View Post
                                You would want to apply CurrentDayOHL to an intraday ( < daily) series.
                                Actually don't care, I just happen to have intrday.

                                I need the Open price in code.

                                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