• 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

Amending OHLC Pit Session Indicator

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

    Amending OHLC Pit Session Indicator

    Hi,

    Wonder if any of you can help me.

    I have a pit session OHL/C for current and prior day - It plots session OHLC for a defined pit session even when on 24hour Globex charts.

    It works OK but I have to allow for an offset of the chart bar period when inputting the start/end time. This is a bit of a pain when I change the period of a chart, because I have to then go into the indicator and change the setting, then change back when I change the chart period back...

    As an example, if the pit opens at 0900 and closes at 1430, and I am on a 5minute chart, I have to input 0905 as the open time and 1435 as the close time, if I am on a 1minute chart then I have to input 0901 and 1431 etc etc - I would prefer being able to simply input the correct actual times, then I could freely change chart period without amending the indicator settings each time.

    Can some sort of offset be put into the code? So that the code accounts for the charts period of bar automatically.

    Appreciate it if someone can help me do this. Thank-you
    Attached Files

    #2
    For dealing with that problem, I have coded indicators based on both an offset and a modified session template. The problem with introducing an offset is that you will often get overlapping bars, for example a bar that starts at 8:57 AM and ends at 9:01 AM. In that case current high and low cannot be determined correctly. I have therefore settled for a modified session template.

    For example, I have subdivided the session template for CL into three sessions

    night session: 6:00 PM EST to 9:00 AM EST
    regular session: 9:00 AM EST to 2:30 PM EST
    evening session: 2:30 PM EST to 5:15 PM EST

    The CurrentDayOHL indicator may calculate OHL from any of the three sessions or from the full Globex session. I have further added a few options

    - dynamic fib lines based on the current high and low
    - noise bands (breakout bands, comparable to Toby Crabels stretch)
    - target bands based on the average daily range (average daily range based on one of the three sessions or the full session)

    The chart below shows open, high and low for yesterday's regular session of CL 10-13. Also have a look at the noise bands which allow to determine the upper and lower breakout points, as well as the target bands which are based on the average range of the regular session. The average range for CL over the last 5 days was 1.39 points, over the last 10 days it was 1.61 points. The target bands are used on the mean of those two values, the upper target band is obtained by adding the average range of the regular session to the current day's low.

    The indicator is available in the download section (search for SessionPivots).
    Attached Files

    Comment


      #3
      I also use that session template for calculating floor pivots from the regular session. For yesterday's close I use the settlement price from daily data as required. The indicator also shows the prior day's high and low and calculates the pivot range.

      The method is pretty convenient. Each instrument uses its own session template, which is preset via the instrument manager. My charts always use the session template <instrument settings>.

      If I toggle from CL 10-13 to ES 09-13, the session template will be automatically modified, this allowing me to display correct OHL values and floor pivots for each instrument. If you use an offset, you will have to enter those values manually, whenever you toggle between instruments. With the subdivided session template, the problem is solved once for ever, and you do not need to bother anymore about the session specifications.
      Attached Files

      Comment


        #4
        Hello ScottieDog,

        Thank you for your post.

        You can use BarsPeriod to check the PeriodType and Value. The example below shows how to set variables based on the BarsPeriod:
        Code:
            if (BarsPeriod.Id == PeriodType.Minute && BarsPeriod.Value == 1)
            {
                mySessionStart = 90100;
            }
            else if (BarsPeriod.Id == PeriodType.Minute && BarsPeriod.Value == 5)
            {
                mySessionStart = 90500;
            }
        For information on BarsPeriod please visit the following link: http://www.ninjatrader.com/support/h...barsperiod.htm

        Please let me know if I may be of further assistance.
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by Harry View Post

          For example, I have subdivided the session template for CL into three sessions

          night session: 6:00 PM EST to 9:00 AM EST
          regular session: 9:00 AM EST to 2:30 PM EST
          evening session: 2:30 PM EST to 5:15 PM EST

          Thanks Harry. Very interesting. I like the idea of them auto changing if I change instrument too, great stuff.

          How do I sub divide the session template? I guess I add a new one but then how will that relate to the "use instrument settings" which will chose one of the defaults, wonīt it?

          Comment


            #6
            Originally posted by ScottieDog View Post
            Thanks Harry. Very interesting. I like the idea of them auto changing if I change instrument too, great stuff.

            How do I sub divide the session template? I guess I add a new one but then how will that relate to the "use instrument settings" which will chose one of the defaults, wonīt it?
            .
            (1) Create new session templates for all instruments that you wish to trade and select those session templates as default templates under instrument settings.

            (2) Open all charts with instrument settings.

            Example: For CL I use the session template attached. Session templates should ALWAYS use exchange time (for proper handling of different daylight savings schedules).
            Attached Files

            Comment


              #7
              Thank-you Harry.

              Gottit! It was the save as default in "instrument manager" that I was missing. Thanks again.


              EDIT: All set up and absolutely fantastic. Now I can change period of chart and the numbers are right, AND I can change instrument and not have to change anything too.

              THANKS Harry. Great stuff.
              Last edited by ScottieDog; 09-04-2013, 11:32 AM.

              Comment


                #8
                Just wondering. Does it use many resources, this indicator series? Ninja is taking much longer to load the charts than normal.

                Thanks for everything!

                Comment


                  #9
                  Originally posted by ScottieDog View Post
                  Just wondering. Does it use many resources, this indicator series? Ninja is taking much longer to load the charts than normal.

                  Thanks for everything!
                  The indicators are ultra-fast and should load within milliseconds. The pivots indicator requires that you first load daily data into your daily data base.

                  http://www.ninjatrader.com/support/f...d=4&linkid=343

                  Comment


                    #10
                    Yes. Restarted the computer then Ninja again and they loaded quick sharp! Thanks.

                    Comment


                      #11
                      I was reading some of your other posts and I thought I saw that you coded one of these with the Value Area included.

                      I canīt find reference to it now, could you point me to the one with VA included please?

                      Comment


                        #12
                        Originally posted by ScottieDog View Post
                        I was reading some of your other posts and I thought I saw that you coded one of these with the Value Area included.

                        I canīt find reference to it now, could you point me to the one with VA included please?
                        The Session Pivots come with a value area based on the central pivot and floor pivot of the prior day - the pivot range (it is created by mirroring yesterday's midline around the main floor pivot PP). For more information on the pivot range, see "The Logical Trader" by Mark Fisher.

                        Value area is more a concept related to market profile. The "market profile" approach for the value area is based on the mode of the price volume distribution of the regular session, which is called "point of control". Starting with the mode a value area is determined that covers about 70% of the volume traded. You can find the rules for calculating the value area high and low in Appendix 1 of the book "Mind Over Markets" by Jim Dalton.

                        Alternatively it is possible to calculate a value area based on

                        -> the current day's VWAP/TWAP and standard deviation bands
                        -> the current day's Median and percentile bands

                        I have indicators available for all different approaches to calculating the value area, for both TPO and VWTPO calculations. The indicators based on the VWAP/TWAP and SD bands are available here:

                        https://www.bigmiketrading.com/downl...load.html?view
                        https://www.bigmiketrading.com/downl...load.html?view
                        https://www.bigmiketrading.com/downl...load.html?view
                        https://www.bigmiketrading.com/downl...load.html?view
                        https://www.bigmiketrading.com/downl...load.html?view
                        https://www.bigmiketrading.com/downl...load.html?view

                        The other indicators will be published soon.

                        Comment


                          #13
                          Hi Harry,

                          Regarding the "anaPivotsDailyv42" I would like to change the names of some of the labels. Notably the labels for Y-High/Low/Close - I found these names in the code on lines 221 - 223 and I added my own label name there instead, I then compiled... But the labels are still the same as the ones you defined...

                          I searched the entire code and canīt find any other reference to the label "Y-High"

                          Is there somewhere else I should be changing the name labels?

                          All the best.

                          Comment


                            #14
                            Isnīt this where the label is defined?

                            Code:
                            Add(new Plot(new Pen(Color.Gray,1), PlotStyle.Line,"Y-High "));

                            Comment


                              #15
                              Originally posted by ScottieDog View Post
                              Hi Harry,

                              Regarding the "anaPivotsDailyv42" I would like to change the names of some of the labels. Notably the labels for Y-High/Low/Close - I found these names in the code on lines 221 - 223 and I added my own label name there instead, I then compiled... But the labels are still the same as the ones you defined...

                              I searched the entire code and canīt find any other reference to the label "Y-High"

                              Is there somewhere else I should be changing the name labels?

                              All the best.
                              Changing the label names on lines 221 to 223 will do what you look for. Try again. If it does not work, post a screenshot, please.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Birdseye, Today, 04:52 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post Birdseye  
                              Started by U0000999, Today, 03:43 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post U0000999  
                              Started by NinjaCustomer, Today, 03:22 AM
                              1 response
                              7 views
                              0 likes
                              Last Post NinjaTrader_Marco  
                              Started by MarianApalaghiei, Today, 01:26 AM
                              0 responses
                              9 views
                              0 likes
                              Last Post MarianApalaghiei  
                              Started by seagraph, Yesterday, 03:27 PM
                              0 responses
                              14 views
                              0 likes
                              Last Post seagraph  
                              Working...
                              X