Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

I just updated my contracts and now have collapsible arrows by some of the strategies

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

    I just updated my contracts and now have collapsible arrows by some of the strategies

    What do the collapsible arrows mean?

    They look like this below.

    When I collapse them they have the previous contract that I switched from.

    Click image for larger version

Name:	image.png
Views:	139
Size:	2.8 KB
ID:	1268741

    #2
    Hello litamm89,

    The arrows in the Strategies are Category sections.


    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      NinjaTrader_ChelseaB

      I now realize what you are saying and it is from category sections.

      The problem was from an outdated added input series like the one below. It was 9-23 but now is 12-23

      Is there something I can put instead of the "ES 09-23" to make it pull from either the current contract date or to mimic the instrument? Something like "ES Current?

      Click image for larger version

Name:	image.png
Views:	125
Size:	8.9 KB
ID:	1271595

      Comment


        #4
        Hello litamm89,

        You can use null for the instrument if you want to use the instrument of the primary series.

        From the help guide:
        "Tips:
        4. For the instrument name parameter null could be passed in, resulting in the primary data series instrument being used."
        https://ninjatrader.com/support/help...dataseries.htm


        Using a variable or method dynamically (to retrieve the current expiry in this case) is not officially supported and will not work in some situations (such as when optimizing).
        However, that said, below is a small bit of unsupported code I've used to achieve this.
        Note, this unsupported so use at your own risk.
        Code:
        string masterName = "MNQ";
        myInstrument = Instrument.GetInstrument(masterName + Instrument.GetInstrument(masterName + " ##-##").MasterInstrument.GetNextExpiry(DateTime.Now).ToString(" MM-yy"));
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          NinjaTrader_ChelseaB

          Thank you so much for your direct answer.

          Very helpful.

          To confirm, judging from your Code: Null would be equivalent to "##-##"

          Therefore, replacing the "ES 09-23" with "##-##" would effectively just pull the instrument we are using and will replace it as the instrument gets replaced?

          So in three months when 12-23 turns to 03-24 the null would still be effectively pulling from the correct source?

          Comment


            #6
            Hello litamm89,

            No, null is not the same as using continuous contract.

            The word null means no reference, or no value.

            AddDataSeries(null, BarsPeriodType.Minute, 5);
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              NinjaTrader_ChelseaB

              Ahh yes that is much more clear.

              So if the instrument is ES-12-23 the null will just pull from whatever the instrument is you're saying?

              Thank you again for your helpfulness and directness

              Comment


                #8
                Hello litamm89,

                Yes, when supplying null as the instrument to AddDataSeries() the instrument of the primary series is used.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                559 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                324 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                101 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                546 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                547 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X