Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Series<T>(Bars) potentially not working

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

    Series<T>(Bars) potentially not working

    According to the documentation I should be able to initialize a custom series with the "new Series<double>(Bars)" constructor, but it doesn't seem to work given the following situation.

    I have an indicator where the primary series is 5 minute bars and the second series are daily bars. I am trying to create a custom series aligned with the second series with the following syntax:

    private Series<double> px;
    px = new Series<double>(BarsArray[1]);

    The px series should be aligned with the BarsArray[1] (daily bars) but it only ever has a length of 0;

    see attached example:
    Attached Files

    #2
    I've been using the "new Series<double>(BarsArray[n])" construct successfully in NT8 for a while now. Just tested it again before commenting: Works fine for me.

    Comment


      #3
      What's weird is that i'm pretty sure I've used it some where before as well. I just can't figure out what is wrong with the sample indicator I've attached. Spent an hour looking at it and can't figure it out.

      Comment


        #4
        Hello GrumpyTrader,

        Thank you for writing in. For your purposes, please see this excerpt from the example on our forums:
        Code:
        /* Syncs another DataSeries object to the secondary bar object.
        We use an arbitrary indicator overloaded with an ISeries<double> input to achieve the sync.
        The indicator can be any indicator. The Series<double> will be synced to whatever the
        BarsArray[] is provided.*/
        secondarySeries = new Series<double>(SMA(BarsArray[1], 50));
        The actual example can be found here: http://ninjatrader.com/support/forum...ead.php?t=3572

        Please let me know if you have any questions or if I may be of further assistance.
        Michael M.NinjaTrader Quality Assurance

        Comment


          #5
          Thanks Michael,
          Question though. The Series<T> constructor works for the second series when I declare it with an indicator like in your example "Series<double>(SMA(BarsArray[1],5))" , but it would be useful to be able to declare with just a Bars reference "Series<double>(BarsArray[1])" when I just want a blank series aligned to that bars object instead of the result of an indicator.

          Comment


            #6
            Hello GrumpyTrader,

            I have submitted your inquiry as a feature request. We highly value customer feedback to improve NinjaTrader!
            Zachary G.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by frankthearm, Today, 09:08 AM
            7 responses
            29 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by NRITV, Today, 01:15 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by maybeimnotrader, Yesterday, 05:46 PM
            5 responses
            25 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by quantismo, Yesterday, 05:13 PM
            2 responses
            17 views
            0 likes
            Last Post quantismo  
            Started by adeelshahzad, Today, 03:54 AM
            5 responses
            33 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Working...
            X