Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Submit multiple orders simultaneously.

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

    Submit multiple orders simultaneously.

    Example trade: I need to go long 2.4 contracts of RTY and short 1.3 contracts of YM, which is:

    Long 2 RTY
    Long 3 M2K
    Short 1 YM
    Short 3 MYM

    I admit I am quite inefficient at changing the symbol and quantity four times, so the market orders get spread out perhaps over a whole minute. Is there a way to stage these four market orders and then submit them all at once? It is easy to flatten everything to exit the trade simultaneously, but the entry is rather slow. I just need to do this manually, not in a strategy. Thanks.

    #2
    Hello HarvOS,

    Thanks for your post.

    It would not be possible to submit market orders on separate instruments at the same time without using a custom NinjaScript strategy. This would require changing the symbol on the chart and the quantity in chart trader to submit a certain number of orders to an instrument. Or, you could consider having 4 separate chart windows open to the instruments and have the quantity set in chart trader for each chart.

    If you are interested in creating a custom NinjaScript strategy to submit the orders to the instruments simultaneously, see the information below.

    The AddDataSeries() method would be used to add multiple data series to a script.

    Then, you could call your Entry order methods using the overload syntax that allows you to specify a barsInProgressIndex argument for the entry order and call the barsInProgressIndex that you want to submit the order to.

    The primary data series the script is running on will have a BarsInProgress value of 0. The first added secondary data series the script in the script will have a BarsInProgress value of 1. The second added secondary data series the script in the script will have a BarsInProgress value of 2, and so on.

    For example, if the first added data series in your script is RTY then you would specify a barsInProgressIndex argument of 1 when calling your Entry order. The below code demonstrates this.

    EnterLong(1, 2, "LongEntry")

    See the help guide documentation below for more information.

    AddDataSeries(): https://ninjatrader.com/support/help...dataseries.htm
    Managed Approach Order Methods: https://ninjatrader.com/support/help...d_approach.htm

    And, review this help guide page to gain a good understanding of working with Multi-Timeframe/Multi-Instrument NinjaScripts: https://ninjatrader.com/support/help...nstruments.htm
    Last edited by NinjaTrader_BrandonH; 07-13-2023, 07:32 AM.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Okay, thanks. I will just use separate charts/order entry windows.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      577 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 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
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X