Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Products

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

    Multiple Products

    I have a ninjascript that I run on multiple futures and setting them up with their individual parameters takes a lot of time. Is there an easier way to do this rather than going through and setting them up one by one and repeating this every time a contract rolls?
    ie, hard code each contract and their individual parameters into the script......

    Im sure this has been discussed before so if there is already a solution posted somewhere for this a link to the relevant thread would be much appreciated.

    Thanks in advance!!

    #2
    maninjapan, you can definitely simplify this by hard coding the needed settings in for each master product traded by the script -

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks for the reply bertrand. Unfortunately I am still below slime when it comes to coding, so I really wouldn't know where to start with adding this to my script. Are there any examples of this code and how it would look implemented into a script?

      This question has probably been asked before, but how come you cant just select a different contract after you have setup a new strategy? Would be so much easier if you could jsut edit and change to the next contract month yeah?

      Comment


        #4
        maninjapan, I've attached a simple indicator example of a technique you could use as a courtesy for you. You will see the SMA uses a length of 12 on ES, 17 on YM and 20 on all other products.

        Providing enhanced options for rolling strategies is on our feedback list already, thanks for your request and input.
        Attached Files
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks Bertrand, I see how it works in your example. Does it have to be in that part of the code as you have done for it to work correctly?

          Comment


            #6
            OnStartUp() is a good place to do it, since it's a one time event you would want to assign to these values to use. However, you can do it for example on the first OnBarUpdate() call as well if you like.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              I was just wondering if any progress had been made regarding the implementation of rolling futures contracts in existing strategies?

              Originally posted by NinjaTrader_Bertrand View Post
              maninjapan, I've attached a simple indicator example of a technique you could use as a courtesy for you. You will see the SMA uses a length of 12 on ES, 17 on YM and 20 on all other products.

              Providing enhanced options for rolling strategies is on our feedback list already, thanks for your request and input.

              Comment


                #8
                Yes maninjapan, I've shared some details here on what we're planning for our next major release in this area - http://ninjatrader.com/support/forum...ad.php?t=54551
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by FrancisMorro, Today, 03:24 AM
                0 responses
                1 view
                0 likes
                Last Post FrancisMorro  
                Started by Segwin, 05-07-2018, 02:15 PM
                10 responses
                1,769 views
                0 likes
                Last Post Leafcutter  
                Started by Rapine Heihei, 04-23-2024, 07:51 PM
                2 responses
                30 views
                0 likes
                Last Post Max238
                by Max238
                 
                Started by Shansen, 08-30-2019, 10:18 PM
                24 responses
                943 views
                0 likes
                Last Post spwizard  
                Started by Max238, Today, 01:28 AM
                0 responses
                10 views
                0 likes
                Last Post Max238
                by Max238
                 
                Working...
                X