• 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

CloseD Series Function

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

    CloseD Series Function

    OpenD(x), HighD(x), LowD(x), CloseD(x), VolumeD(x) series functions to easily reference daily data on intraday charts.

    (x = 0 to seriessize-1)

    see CloseD

    also similarly for weekly & monthly: OpenW(x), HighW(x), LowW(x), CloseW(x), VolumeW(x), OpenM(x), HighM(x), LowM(x), CloseM(x), VolumeM(x).

    #2
    Hello,

    Thank you for the suggestion.

    I see by the link provided that: The CloseD function allows you to reference the daily Close of previous days in an intraday chart (minute or tick-based) or a daily chart.

    There is an indicator that would assist in doing this in NinjaTrader.

    The PriorDayOHLC indicator would be the most simple way from a script to get a Prior days values. http://ninjatrader.com/support/helpG...htsub=priorday

    For example:

    PriorDayOHLC().PriorLow[0];

    would be the prior days low.



    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      can I ask how I would get PriorDayOHLC().PriorClose[100] on a 5 minute chart and how many 5 minute bars would that need?

      i.e previous day 100 not previous 5 minute bar 100 - I need daily close of 1 to 100 days to calculate moving average????

      if its 90000+ 5 minute bars that is the reason for my suggestion.

      can I ask NT again to please review CloseD ... many platforms include easy functions such as this to allow intraday charts to easily access daily OHLC data.
      Last edited by futurenets; 03-04-2016, 08:54 AM.

      Comment


        #4
        Originally posted by futurenets View Post
        can I ask how I would get PriorDayOHLC().PriorClose[100] on a 5 minute chart and how many 5 minute bars would that need?

        i.e previous day 100 not previous 5 minute bar 100 - I need daily close of 1 to 100 days to calculate moving average????

        if its 90000+ 5 minute bars that is the reason for my suggestion.

        can I ask NT again to please review CloseD ... many platforms include easy functions such as this to allow intraday charts to easily access daily OHLC data.
        Use GetDayBar().

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

        Comment


          #5
          ok thanks koganam

          re. GetDayBar

          "This bar is a virtual bar built off of the underlying data series" would I not have the same problem as described? i.e. I'd need 90,000+ 5 minute bars to calculate a 100 day moving average on a 5 minute chart.

          see Easy Intarday Chart Access to Daily OHLC Data
          Last edited by futurenets; 03-07-2016, 03:51 AM.

          Comment


            #6
            Easy Daily Data Question

            if an indicator is loaded on a daily chart which exposes a dailyClose series can this be accessed by another chart e.g. 5 minute?

            if so how?

            (this topic is associated with Easy Intarday Chart Access to Daily OHLC Data

            Comment


              #7
              Originally posted by futurenets View Post
              ok thanks koganam

              re. GetDayBar

              "This bar is a virtual bar built off of the underlying data series" would I not have the same problem as described? i.e. I'd need 90,000+ 5 minute bars to calculate a 100 day moving average on a 5 minute chart.

              see Easy Intarday Chart Access to Daily OHLC Data
              There would appear to be many things misunderstood here; compounded by faulty arithmetic.

              On any platform, to get a daily SMA(100), you will need 100 daily bars. Whether the platform hides it or not, you still need 100 daily bars. So, sorry, I do not get the point here. Data is data. You load the amount of data that you need to process the information that you want. How would you expect to calculate a 100 day SMA on less than 100 days of data?

              How do you get 90,000+ 5-minute bars in 100 days? There are 12, 5-minute bars in an hour; 24 hours in a day. In the kind of arithmetic that I know about, that amounts to 288, 5-minute bars in a day, and so 28,800 bars in 100 days. Still a lot of bars, but considerably less than 90,000 of them.
              Last edited by koganam; 03-07-2016, 09:02 AM.

              Comment


                #8
                forgive my mis-calculation, yes you're right 28,800 bars.

                I do not get the point here
                my point is that if a daily series already exists on the server (i.e. not sets of 28,800) then it would make life a lot easier if a series function could access it easily as with TradeStation. 100 was an arbitrary number to illustrate this.
                Last edited by futurenets; 03-07-2016, 07:44 AM.

                Comment


                  #9
                  Originally posted by futurenets View Post
                  forgive my mis-calculation, yes you're right 28,800 bars.

                  my point is that if a daily series already exists on the server (i.e. not sets of 28,800) then it would make life a lot easier if a series function could access it easily as with TradeStation. 100 was an arbitrary number to illustrate this.
                  NT does not run on a server. All data access is local, after NT first downloads the data to the local machine, so there is no daily data on any server to access directly. Work within the paradigm of the platform. This is not TradeStation; it is NinjaTrader.

                  I doubt that NT is going to redesign this to be a platform where clients calculate from data directly on a server: it is just too big a change in architecture.

                  Comment


                    #10
                    ok thanks getting a better idea of the limits now so stuck with the problem?

                    if I need to get daily data on a 5 minute chart then I need to load 28,800 (or something) 5 minute bars for each additional day I need?

                    maybe tell Dave http://ninjatrader.com/support/forum...428#post451428
                    Last edited by futurenets; 03-07-2016, 09:14 AM.

                    Comment


                      #11
                      your responses are clarifying thank you.

                      could you comment on http://ninjatrader.com/support/forum...ad.php?t=83601 ?

                      Comment


                        #12
                        Originally posted by futurenets View Post
                        ok thanks getting a better idea of the limits now so stuck with the problem?

                        if I need to get daily data on a 5 minute chart then I need to load 28,800 (or something) 5 minute bars for each additional day I need?

                        maybe tell Dave http://ninjatrader.com/support/forum...428#post451428
                        No, you need to load 288 bars for each day, not 28.800 bars. Keep the arithmetic straight.

                        In any case, the point is moot. Just load the number of days that you need, plus maybe a buffer. No need to be doing these kind of calculations of how may 5-minute bars are needed. If you need to load 100 days, just load them.
                        Attached Files

                        Comment


                          #13
                          only problem is 100 days would only provide only 1 moving average point and we need to backtest at least a couple of years.

                          was hoping to avoid reading daily OHLC text files but so far can't see any way round it?

                          Comment


                            #14
                            Originally posted by futurenets View Post
                            only problem is 100 days would only provide only 1 moving average point and we need to backtest at least a couple of years.

                            was hoping to avoid reading daily OHLC text files but so far can't see any way round it?
                            Not true. Just about all charting packages use a sliding window. NT is no different. You will have a continuous plot of the moving average whose value depends on the previous 100 bars, however many bars are loaded. It seems to me that you are looking for problems when none exist.

                            That is the essential meaning of using a data stream, rather than a static stochastic space. Just load your bars and be about it.
                            Last edited by koganam; 03-07-2016, 10:46 AM.

                            Comment


                              #15
                              It seems to me that you are looking for problems when none exist
                              - hope so but just making sure.

                              but thanks for helping out.

                              so say I have 500 5 minute sessions to backtest each one requiring a 100 day moving average - how many 5 minute bars do I need to load?

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Austiner87, Yesterday, 09:33 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post Austiner87  
                              Started by HiddenPhilosopher, Yesterday, 07:24 PM
                              0 responses
                              10 views
                              0 likes
                              Last Post HiddenPhilosopher  
                              Started by dkbyond, Yesterday, 06:43 PM
                              0 responses
                              10 views
                              0 likes
                              Last Post dkbyond
                              by dkbyond
                               
                              Started by i2w8am9ii2, Yesterday, 06:05 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post i2w8am9ii2  
                              Started by YevhenShynkarenko, Yesterday, 05:46 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post YevhenShynkarenko  
                              Working...
                              X