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 samir, Today, 07:00 PM
            0 responses
            9 views
            0 likes
            Last Post samir
            by samir
             
            Started by travisloneker, Today, 06:52 PM
            0 responses
            7 views
            0 likes
            Last Post travisloneker  
            Started by InfraredBusa, Today, 05:50 PM
            0 responses
            3 views
            0 likes
            Last Post InfraredBusa  
            Started by White Fork, Today, 04:56 PM
            1 response
            8 views
            0 likes
            Last Post White Fork  
            Started by steveyinyang, Today, 02:48 PM
            3 responses
            22 views
            0 likes
            Last Post steveyinyang  
            Working...
            X