Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Use condtions for ES but then submit orders for another futures contract

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

    Use condtions for ES but then submit orders for another futures contract

    Is there an easy way to make my code based off of my ES conditions to take trades for NQ or other futures easily with just a few pieces of code that I can enter?

    #2
    Hello durdcash,

    You could do that using the strategy builder. You would need to use the NQ as the primary instrument that you apply the strategy to and then add the ES as a secondary instrument in the builder. That would let you form conditions based on ES prices and submit orders to the NQ primary instrument.

    https://ninjatrader.com/support/help...standingTheAdd itrionalDataScreen
    https://ninjatrader.com/support/help..._builder.htm#H owToMakePriceDataComparisons​

    You can also make more complex scripts in manual coding that use any primary instrument you wanted and submit orders to any of the secondary instruments that you add.





    Comment


      #3
      I have been able to finally get this to work where I have my ES conditions submit for trade 1 which is ES and then trade submits to NQ. Currently the only way I have to exit is when ES hits my trade profit target it sells NQ. What is the best way to make it to use the data from NQ. I have created the data series for NQ and am using the index of [1] for the trades. Do I need to create other variables in other locations for example on bar update do I need to add the barsinprogress==1 for another section and then move the exit logic there?

      Comment


        #4
        Hello durdcash,

        If you are manually coding the strategy you can add any series that you want the strategy to use and then isolate parts of its logic using barsinprogress conditions. If you wanted the NQ data used and that is barsinprogress 1 then that exit logic would need to go inside thata part of the script. You can see some examples of separating logic in the following page:

        Comment


          #5
          durdcash here's a 3rd party add-on that does what you want --> https://www.speedytradingservers.com...-8-replicator/

          Comment


            #6
            NinjaTrader_Jesse Thanks! Looks like I got it all figured it out. From the code I have for exit, I was still referencing position[0] instead of positions[1].

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            53 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            130 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            70 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            44 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            49 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X