Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Intraday plot based on prior day daily range data

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

    Intraday plot based on prior day daily range data

    For ES i.e. E-Mini charts

    I use Kinetic EOD data and imported IB intraday day data in NT7.

    I have a requirement to plot on the current day intraday chart a line based on yesterday's Daily data e.g. (H+L) / 2 as an example i.e. not a standard value like Median or Close.

    Definition: Current day Intraday data >>I use the full Globex time range as current day so any bar that prints after 17:01 (using NT time) would have the prior day value shown until 17:00 the next day.

    Definition: Prev day data >> is Kinetic EOD data.

    If this cannot be done I can specify the time range for what constitutes a day Open and Close in the intraday day data.

    I cannot find an indicator plot that does this.

    Can anyone point me in the direction of one that does this or point me to one I can modify.

    On an Intraday chart I want to be able to scroll back and forward thru days and see the level on each day as a straight line plot on the chart.

    Any questions please get back to me.
    Last edited by skiguy; 11-01-2015, 12:51 AM.

    #2
    Hello,
    Thank you for your post.
    You can add in and reference the daily data by adding the daily data as a secondary data series. You can do this by using the Add() method. Please see the following on using the Add() method to get another data series. http://ninjatrader.com/support/helpGuides/nt7/add3.htm
    In addition please see the following link on working with Multi-Time Frames http://ninjatrader.com/support/helpG...nstruments.htm

    I have also included a reference file that provides an example of using a secondary data series http://ninjatrader.com/support/forum...ead.php?t=3572

    Please let me know if you have any questions.
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      Thanks so much Cody.

      I will have a look at the links you provided tomorrow my time.

      Comment


        #4
        Originally posted by skiguy View Post
        For ES i.e. E-Mini charts

        I use Kinetic EOD data and imported IB intraday day data in NT7.

        I have a requirement to plot on the current day intraday chart a line based on yesterday's Daily data e.g. (H+L) / 2 as an example i.e. not a standard value like Median or Close.

        Definition: Current day Intraday data >>I use the full Globex time range as current day so any bar that prints after 17:01 (using NT time) would have the prior day value shown until 17:00 the next day.

        Definition: Prev day data >> is Kinetic EOD data.

        If this cannot be done I can specify the time range for what constitutes a day Open and Close in the intraday day data.

        I cannot find an indicator plot that does this.

        Can anyone point me in the direction of one that does this or point me to one I can modify.

        On an Intraday chart I want to be able to scroll back and forward thru days and see the level on each day as a straight line plot on the chart.

        Any questions please get back to me.
        GetDayBar()?

        ref: http://ninjatrader.com/support/helpG.../getdaybar.htm

        Comment


          #5
          Hi Cody,

          What determines when the value of the higher time data element plots?

          Please refer to my original post where I detail my timeframes.

          As a simple example, let’s say I want the previous day closes on a 5 min chart.

          Using you standard examples etc as per your links when exactly would the most recent daily close plot?

          Example only:

          Thurs (5/11) close is the most recent close.

          (I have noted Kinectic EOD uses the 15:15 NT bar as the close for EOD data).

          ES trades until 16:15 (with a break in between then and 15:15)

          Then it starts trading again at 17:00 (5/11).

          Requirement:

          Is that 5/11 close is plotted after 5/11 close even when the date is still 5/11 and all the way through to close on 6/11.

          Comment


            #6
            There are three different closes each day. The regular close (for index futures at 3:15 PM Central), the settlement price (a volume-weighted average of all transactions that take place during the 30 second or 60 second interval prior to the regular close) and the last traded price of the day (just beforre 4:00 PM Central). Kinetick does not supply the regular close (as you said), but it supplies the settlement price. The settlement price is the official closing price which is published by the exchange.

            Cheap datafeeds such as the datafeed from Interactive Brokers do not supply the settlement price with daily data, but the daily data they offer is simply compunded from intraday data and therefore the close is taken at 4:00 PM Central. Therefore it is a good idea to use Kinetick EOD, because it offers you the official closing price, which is the settlement price.

            If you wish to catch the settlement price, you will be only able to catch it from daily data. Usually daily data providers only update daily data during the technical break between 4:00 PM and 5:00 PM Central. This determines the question at what time you wish to display the close of the last regular session.

            If you already wish to diplay the close between 3:30 and 4:00 PM Central, then you need to take the regular close from intraday data. If you only need to display that close for the new trading day, which starts at 5:00 PM Central, then you can take the close from daily data, and the indicator will display the settlement price.

            I have coded an indicator, the anaPivotsDaily which lets you select to display

            -> the settlement price
            -> the RTH close
            -> the full session close

            of the prior day. This can be combined with RTH or ETH high and low. For the implementation of this indicator I have not used the Add() method, because it does not work correctly with all session templates. Depending on the session template selected, the daily data will be inserted too early (prior to the close) or too late (after the first sub-session of the next trading day).

            You could read the code of the indicator as it comes open source. Below attached are 4 charts:

            example 1 - floor pivots calculated from regular high, regular low and settlement price
            example 2 - floor pivots calculated from regular high, regular low and regular close
            example 3 - Globex pivots calculated from full session high, full session low and settlement price
            example 4 - Globex pivots calculated from full session high, full session low and last traded price

            All charts show the prior day's high, prior day's low and closing price.

            The indicator is parts of the SessionPivots, which are available in the download section.
            Attached Files
            Last edited by Harry; 11-09-2015, 05:12 AM.

            Comment


              #7
              For projections (preliminary high, low, close) intraday data can be used. In this case (chart attached) the projections are for coming Monday. The calculation uses RTH high and low and the regular close as a replacement for the settlement price.
              Attached Files

              Comment


                #8
                Harry,

                Thank you for your detailed response which I very much appreciate.

                A while back I did download and install your anaPivotsDaily but at the time I was not at this level of detail.

                I will take a closer look now.

                Your detailed response confirms why I asked the question as I had tried a few other indicators that did not give the correct results as per my expectations.

                Comment


                  #9
                  @NT Support

                  One of the reasons I posted my follow up was I realised I did not know in enough detail how NT worked.

                  Let me explain:

                  I have a daily ES 12-15 chart

                  I have intraday ES 12-15 chart/s.

                  As per my original post:

                  I use Kinetic EOD data and imported IB intraday day data in NT7.

                  Now I assumed my daily data was populated by Kinetic data but as I thought about it more I was asking myself mmm where is the daily data actually from?
                  I always connect Kinetic EOD first then IB connection.
                  So the bottom line question is what exactly determines what data is used to populate my NT database in each of the above cases?
                  Hope that makes sense.

                  Comment


                    #10
                    Harry,

                    I had a very quick look at your code.

                    pp = (currentHigh + currentLow + currentClose)/ 3;

                    this is exactly what I use on my daily chart displaced forward 1 day.

                    and it is the only value I want to see as per my original post. I can work out how to disable the other levels.

                    if you have the time could you say if your indicator does exactly that.

                    put simply I want the that level (pp = (currentHigh + currentLow + currentClose)/ 3 from my daily chart on my intraday chart starting from the close as per my daily close.

                    However I don't really care which of the "closes" is used in the calc as it is a) not the holy grail and b) it is just a general level for consideration during the next trading day which in my mind starts at 17:00 on the same day as the “close” (unless it is Sunday 17:00 of course).


                    Comment


                      #11
                      For anyone who reads this thread in the future please make sure you understand and confirm with your own data, time zone, market and indicator EXACTLY what is being plotted given your requirements.

                      Let me explain.

                      I have tried 2 other Prior day OHLC type indicators (not Harry’s yet).

                      One of them was clearly not what I wanted. NB: it may well have been perfect for what it was coded for.

                      The other gave exactly the correct value but for some reason the “new day” value but did not start plotting until 11:30 PM US CST time for some reason which is not the correct time by any measure.

                      Long story short:

                      Most do not fully understand the interaction of software, time zones, data, NT coding implications/limitations etc etc.

                      I am not saying I fully do but I can say there are major issues with any combination of the above that are not realised by many. I do know there are many potential and actual issues.

                      I have over 25 years’ experience in IT with major financial institutions, trading etc so I feel I know some of the potential issues.

                      I am not selling anything so please know exactly what you are dealing with and that you are responsible for the results at the end of the day.

                      Harry’s response is a shining light IMO in that he took the time to give a detailed response, explain some of the considerations hence my thank you to Harry.

                      You cannot be too careful IMO.
                      Last edited by skiguy; 11-09-2015, 07:22 PM.

                      Comment


                        #12
                        Originally posted by skiguy View Post
                        @NT Support

                        One of the reasons I posted my follow up was I realised I did not know in enough detail how NT worked.

                        Let me explain:

                        I have a daily ES 12-15 chart

                        I have intraday ES 12-15 chart/s.

                        As per my original post:

                        I use Kinetic EOD data and imported IB intraday day data in NT7.

                        Now I assumed my daily data was populated by Kinetic data but as I thought about it more I was asking myself mmm where is the daily data actually from?
                        I always connect Kinetic EOD first then IB connection.
                        So the bottom line question is what exactly determines what data is used to populate my NT database in each of the above cases?
                        Hope that makes sense.

                        When you first-connect to Kinetick EOD and second-connect to IB, all daily data that is available will be taken from Kinetick EOD. Data that is not available with Kinetick EOD will be downloaded from Interactive Brokers.

                        However, when you occasionally first-connect to Interactive Brokers, NinjaTrader will download daily data from Interactive Brokers. Once it is downloaded, it will not be replaced with Kinetick EOD data the next time that you connect to Kinetick EOD.

                        Therefore it is recommended from time to time to connect to Kinetick EOD and open a daily chart. Then reload all data to make sure that it is Kinetick EOD data.

                        Comment


                          #13
                          Originally posted by skiguy View Post
                          Harry,
                          Originally posted by skiguy View Post

                          I had a very quick look at your code.

                          pp = (currentHigh + currentLow + currentClose)/ 3;

                          this is exactly what I use on my daily chart displaced forward 1 day.

                          and it is the only value I want to see as per my original post. I can work out how to disable the other levels.

                          if you have the time could you say if your indicator does exactly that.

                          put simply I want the that level (pp = (currentHigh + currentLow + currentClose)/ 3 from my daily chart on my intraday chart starting from the close as per my daily close.

                          However I don't really care which of the "closes" is used in the calc as it is a) not the holy grail and b) it is just a general level for consideration during the next trading day which in my mind starts at 17:00 on the same day as the “close” (unless it is Sunday 17:00 of course).

                          The indicator plots the pivot range, which is built around the main pivot PP as per your formula. The pivot range is obtained by mirroring the central pivot CP = (prior high + prior low)/2 around the main pivot PP = (prior high + prior low + prior close)/3. You will be able to select from ETH/RTH high and low and either take the close from daily data (settlement) or intraday data.


                          Plots that you do not need can be set to "Transparent".

                          Comment


                            #14
                            Hello Skiguy,

                            Harry is correct on how the data is downloaded from the data providers.
                            All available data will first try to download from the primary data provider for the supported instrument types and then will download the remain form the secondary connection.
                            In regards to your question on when Kinetick records the closes Kinetick daily data reports the close at 3:15 central time. The Kinetick daily data only provides data from the regular trading hours. No data from the Electronic trading hours is included in the daily data. This means that the close on 5/11 after 3:15 does not get put on the 5/12 bar.
                            If we can be of any other assistance please let us know.
                            Cody B.NinjaTrader Customer Service

                            Comment


                              #15
                              Originally posted by NinjaTrader_CodyB View Post
                              The Kinetick daily data only provides data from the regular trading hours. No data from the Electronic trading hours is included in the daily data.
                              I am sorry if I disagree. The statement is not correct.

                              Kinetick EOD provides daily data from the full session. Just the close is replaced with the settlement price. In detail:

                              Kinetick daily open = full session open at 5:00 PM Central
                              Kinetick daily high = full session high
                              Kinetick daily low = full session low
                              Kinetick daily close = settlement price (not the regular close)

                              This is the data published on the CME website, as Kinetick EOD takes the official data.

                              Other datafeeds such as Rithmic and CQG supply daily bars built from RTH data:

                              CQG daily open = regular open
                              CQG daily high = regular high
                              CQG daily low = regular low
                              CQG daily close = regular close (last traded price during regular session)

                              This is one of the reasons that I prefer Kinetick, as I cannot access the settlement price with CQG data.
                              Last edited by Harry; 11-09-2015, 05:05 PM.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by CortexZenUSA, Today, 12:53 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post CortexZenUSA  
                              Started by CortexZenUSA, Today, 12:46 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post CortexZenUSA  
                              Started by usazencortex, Today, 12:43 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post usazencortex  
                              Started by sidlercom80, 10-28-2023, 08:49 AM
                              168 responses
                              2,265 views
                              0 likes
                              Last Post sidlercom80  
                              Started by Barry Milan, Yesterday, 10:35 PM
                              3 responses
                              11 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X