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

DataSeries White Paper

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

    #31
    Originally posted by koganam View Post
    The question still remains. If all the corrections are synchronized and such synchrony is flawlessly maintained, what is the point in amalgamating the collections with new glue that you have to maintain. Then every time you process that data, you are loading extra data that you may not need for anything. What is the point of creating a single object from objects that are already in synchrony, and can be accessed with minimal resources?
    I've only used it since NT7/(NT8? haven't tested live since I can't run both due to provider restrictions) can not record my data since there is no "LAST" and the intraday feed comes in under "DailyHigh" and "DailyLow".

    When 4:15pmEST hits, I know how many 30 second bars there are possible in the day, and write that out to a file.

    NT is deficient in recording replay data when there is no LAST.

    Comment


      #32
      Originally posted by koganam View Post
      If all the corrections are synchronized ...
      I think you mean collections ...

      Originally posted by koganam View Post
      What is the point of creating a single object from objects that are already in synchrony, and can be accessed with minimal resources?
      Exactly!

      Well, Rob, there you have it. Our self-appointed proverbial code review committee has reached a consensus, and the rhetorical agreements have been cast: you'd be nuts to do that collective TradingDay class idea, so don't do that.

      Comment


        #33
        Originally posted by bltdavid View Post
        I think you mean collections ...
        Yup! I am now officially a pendejo.

        I have corrected the original text. Thanks.

        Comment


          #34
          I did, but I missed:

          "It begins by providing the new NinjaScript programmer with a clear understanding of the underlying structure, data, key classes,"

          So I'll definitely get it! Thanks!

          Comment


            #35
            Originally posted by RobVig View Post
            I did, but I missed:

            "It begins by providing the new NinjaScript programmer with a clear understanding of the underlying structure, data, key classes,"

            So I'll definitely get it! Thanks!
            Ah, you're referring to post #27, right?

            New lesson: see the "Quote" button in the lower right? It's usually next to the "Reply" button.

            When you want to reply to a posting, especially an older posting that is further back in the thread, use the "Quote" button to start your reply, rather than the "Reply" button.

            Using "Quote" helps maintain some context to the exact post you're replying to.
            Last edited by bltdavid; 06-05-2016, 11:24 AM.

            Comment


              #36
              Ok, Rob, here's an easter egg hunt for you.

              In Patrick's first reply to you, he said,

              Originally posted by NinjaTrader_PatrickH View Post
              It is a series of values synced to the number of bars in a bars object.
              Actually, he said objects, but I changed it to values. But, since we're all programmers here, let's think about his answer for a second. What does 'synced' mean and why should you care? (Patrick is certainly correct, but my point goes deeper: we're gonna expand his answer, because he's saying a lot in that one sentence, and I feel like another essay is needed to explain it. )

              How do you, the programmer, establish the relationship such that your DataSeries is 'synced' to the bars in a Bars object? (Note the capital 'Bars', this is hint #1).

              Here is hint #2. In your first post, you gave the link for the DataSeries Class. Go back to that web page and find the link embedded in the comment:

              "
              * DataSeries objects can be used on supplementary series in a multi-time frame and instrument strategy. Please see our support forum NinjaScript reference samples section for further information."

              That link will take you to a reference sample that shows an example of initializing a DataSeries object. Did you find it? The files should be named,

              Code:
              SampleSyncSecondarySeries_NT7.zip
              SampleSyncSecondarySeries_NT8.zip
              Download both of them, but only look at the NT7 example for now.

              Here is the relevant code from the NT7 example,

              Code:
              // Syncs a DataSeries object to the primary bar object
              primarySeries = new DataSeries(this);
              What do you think 'this' is doing there as an argument?
              Why would the engineer who wrote the DataSeries class require a 'this' reference?

              The answer is out there. For now, I'll leave the answer as an exercise for the reader.

              I'll provide my answer in another posting shortly, where I'll finish this essay and discuss the meaning and importance of that elusive word 'synced' as it pertains to xxxSeries objects.

              But, wait, there's more. After that last essay, I'll write one more (just one, I promise) on how the xxxSeries classes are changing in NT8.

              Stay tuned.
              Last edited by bltdavid; 06-05-2016, 08:08 PM.

              Comment


                #37
                In a custom indicator I output 2 plots, one from having mathematically integrated the highs of multiple symbols, and the other from integrating the lows of multiple symbols. As an alternative, for correct swing analysis, I've also created two separate custom indicators that do the same thing, one for the integrated highs, the other for the integrated lows. At present I must apply two Swing indicators; one Swing indicator to mark the swing highs on the Integrated Highs indicator (coloring the integrated swing lows transparent) and one to mark the swings on the integrated Lows indicator (coloring the Highs transparent)

                Can I create a bar type or custom data series the highs and lows of the bars of which represent these integrated highs and lows such that any one swing indicator could plot both the swing highs and lows? Ideally I would like a user-defined custom dataseries that could be the primary series of a chart to which any indicator would default as being recognized as the dataseries the indicator referenced. I use sharkindicator.com Bloodhound and am trying to avoid handling integrated highs and lows separately as I now need to run 2 swing indicators to evaluate the highs swings of the integrated Highs plot and the low swings of the integrated Lows plot.
                Last edited by ProfitPilgrim; 04-12-2017, 09:25 PM.

                Comment


                  #38
                  Originally posted by ProfitPilgrim View Post
                  In a custom indicator I output 2 plots, one from having mathematically integrated the highs of multiple symbols, and the other from integrating the lows of multiple symbols. As an alternative, for correct swing analysis, I've also created two separate custom indicators that do the same thing, one for the integrated highs, the other for the integrated lows. At present I must apply two Swing indicators; one Swing indicator to mark the swing highs on the Integrated Highs indicator (coloring the integrated swing lows transparent) and one to mark the swings on the integrated Lows indicator (coloring the Highs transparent)
                  Ok, so ... what's wrong with that?

                  Originally posted by ProfitPilgrim View Post
                  Can I create a bar type or custom data series the highs and lows of the bars of which represent these integrated highs and lows such that any one swing indicator could plot both the swing highs and lows? Ideally I would like a user-defined custom dataseries that could be the primary series of a chart to which any indicator would default as being recognized as the dataseries the indicator referenced. I use sharkindicator.com Bloodhound and am trying to avoid handling integrated highs and lows separately as I now need to run 2 swing indicators to evaluate the highs swings of the integrated Highs plot and the low swings of the integrated Lows plot.
                  I don't use Bloodhound.

                  Remember a data series is just way to store a single value on a per bar basis.

                  So, ok, you want to store a value which represents a bar's high value. Piece of cake.

                  But now you want to store highs and lows in that same data series? Ok, so let's say high values in the data series are positive, but you store low values in that data series as negative numbers -- so 'sign' of the value tells you high vs low.

                  Try this technique and you're probably still going to run into problems.

                  What if that same bar logically has both the high value and the low value?

                  For that bar, the single data series you're proposing, you can only store one of the two values, yet both values are logically associated with the same bar.

                  Well, which value do wish to sacrifice? You've only got one data series ...

                  If I understand what you're asking for, I'd say two data series is needed to store the high values separate from the low values.

                  Comment


                    #39
                    Originally posted by ProfitPilgrim View Post
                    As an alternative, for correct swing analysis, I've also created two separate custom indicators that do the same thing, one for the integrated highs, the other for the integrated lows
                    Why two indicators?

                    Can't you create one indicator with 2 plots, like your first custom indicator?

                    I mean, the default Swing indicator plots both highs and lows from a single indicator (it uses 2 plots) so why are you having to use 2 separate indicators to plot your highs and lows?

                    Comment


                      #40
                      Thanks bltdavid. My hope is that there is a way to convert the integrated highs and integrated lows into bars so one swing indicator would identify both the swing lows and highs correctly. I do have a custom indicator that plots 2 plots, that is, the integrated highs and integrated lows, but doesn't a swing indicator identify the high and low swings of one or the other plot, not plot the high swings from the higher plot and low the swings from the lower plot? How can I get it to plot the swing highs off of one plot representing the integrated highs, and plot the swing lows off of the other plot representing the integrated lows?

                      Comment


                        #41
                        Originally posted by ProfitPilgrim View Post
                        Thanks bltdavid. My hope is that there is a way to convert the integrated highs and integrated lows into bars so one swing indicator would identify both the swing lows and highs correctly. I do have a custom indicator that plots 2 plots, that is, the integrated highs and integrated lows, but doesn't a swing indicator identify the high and low swings of one or the other plot, not plot the high swings from the higher plot and low the swings from the lower plot? How can I get it to plot the swing highs off of one plot representing the integrated highs, and plot the swing lows off of the other plot representing the integrated lows?
                        Well, I'm not sure what you're really asking.

                        A plot, at its core, is a DataSeries. But, a plot also has set of attributes associated with it (color, plot style, dash style, pen width) for drawing the values onto the chart. If the plot's DataSeries has no value set for a certain bar, nothing is drawn for that bar.

                        So, the swing indicator sets up 2 plots. These plots are drawn and represent the swing highs and swing lows.

                        If you want your 2 plots to be something else, such as integrated highs and integrated lows, well, you sound like a programmer, so, well, make it happen.

                        I mean, it seems to me you have 2 separate indicators already doing what you want, just do some massive editing and copy & paste from them until one indicator with 2 plots does what you want.

                        Comment


                          #42
                          Originally posted by ProfitPilgrim View Post
                          My hope is that there is a way to convert the integrated highs and integrated lows into bars so one swing indicator would identify both the swing lows and highs correctly.
                          You don't need them to be bars. If your integrated highs and integrated lows are being stored as DataSeries, perhaps named IntegHigh and IntegLow, you can always pass these DataSeries to Swing directly.

                          Swing(IntegHigh, Strength)

                          or

                          Swing(IntegLow, Strength)

                          Is this what you're asking?

                          Comment


                            #43
                            Yes, you are correct that 2 swing indicators are needed at present, one to reference the high swing (and make transparent the useless low swings of the integrated highs) and one vica versa. "What's wrong with that" is that it doubles the complexity of creating a system based on a synthetic symbol needing to function as an effective OHLC data series (notice the space) derived mathematically from multiple data series (i.e. symbols), since many indicators, like Swing, extract the appropriate dataseries (O,H,L, or Close) from the input data series for each of their plots. In my case the desired input is a synthetic "symbol" derived from multiple symbols. Is it possible to identify to Ninjatrader indicators a custom data series as their input? I see at http://ninjatrader.com/support/forum...ghlight=series that in NT7 (no longer in NT8) that one could manipulate the default PriceType, changing the default from Close to Typical.If one could use a custom data series as an input then any indicator that uses more than one dataseries (like H and L) of the input OHLC data series to produce its plots would work without having to duplicate each of those indicators in order to reference more than one specific dataseries (like my integrated lows plot) as their inputs depending on which of OHLC one wishes to evaluate in their system. CAn the new NT8 T series be used to simplify this problem? It would sure be nice of Ninjatrader has a way to reference a user-defined symbol where the user defines OHLC and it could be the primary, default chart symbol.
                            Last edited by ProfitPilgrim; 04-14-2017, 08:08 AM.

                            Comment


                              #44
                              Originally posted by ProfitPilgrim View Post
                              Yes, you are correct that 2 swing indicators are needed at present, one to reference the high swing (and make transparent the useless low swings of the integrated highs) and one vica versa. "What's wrong with that" is that it doubles the complexity of creating a system based on a synthetic symbol needing to function as an effective OHLC data series (notice the space) derived mathematically from multiple data series (i.e. symbols), since many indicators, like Swing, extract the appropriate dataseries (O,H,L, or Close) from the input data series for each of their plots. In my case the desired input is a synthetic "symbol" derived from multiple symbols. Is it possible to identify to Ninjatrader indicators a custom data series as their input? I see at http://ninjatrader.com/support/forum...ghlight=series that in NT7 (no longer in NT8) that one could manipulate the default PriceType, changing the default from Close to Typical.If one could use a custom data series as an input then any indicator that uses more than one dataseries (like H and L) of the input OHLC data series to produce its plots would work without having to duplicate each of those indicators in order to reference more than one specific dataseries (like my integrated lows plot) as their inputs depending on which of OHLC one wishes to evaluate in their system. CAn the new NT8 T series be used to simplify this problem? It would sure be nice of Ninjatrader has a way to reference a user-defined symbol where the user defines OHLC.
                              Well, you can define your own custom bartype.

                              See the code in bin/Custom/Type for possible examples.

                              And, for even more examples, download every bartype you can find (eg, BetterRenko, UniRenko, KaseBars, RangeNoGap, etc) and study their sources.

                              I don't know much about coding for new bar types (I'm sure there are plenty of undocumented gotchas), so further questions may be better answered by NinjaTrader support.

                              Also, you might try talking to RJay or Anthony at PureLogik, they both have extensive experience with coding commercial Renko products, and thus may be able to help you.

                              Good luck!

                              Comment


                                #45
                                Thanks Dave. The pros at PureLogik kindly responded to my inquiry that the current status of Ninjatrader does make my request possible.
                                Last edited by ProfitPilgrim; 05-18-2017, 05:45 AM.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by maybeimnotrader, Today, 05:46 PM
                                0 responses
                                5 views
                                0 likes
                                Last Post maybeimnotrader  
                                Started by quantismo, Today, 05:13 PM
                                0 responses
                                6 views
                                0 likes
                                Last Post quantismo  
                                Started by AttiM, 02-14-2024, 05:20 PM
                                8 responses
                                166 views
                                0 likes
                                Last Post jeronymite  
                                Started by cre8able, Today, 04:22 PM
                                0 responses
                                8 views
                                0 likes
                                Last Post cre8able  
                                Started by RichStudent, Today, 04:21 PM
                                0 responses
                                5 views
                                0 likes
                                Last Post RichStudent  
                                Working...
                                X