Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Execute strategy on one chart, but entry / exist on different symbol

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

    Execute strategy on one chart, but entry / exist on different symbol

    Hi there,

    exit* not exist... typo haha

    I have an ES future strategy that I would simply like to execute MES orders instead. Is there a straightforward way to do this in the strategy builder? Or is there some simple code I can insert into my NinjaScript?

    Thank you
    Last edited by quicksandatl; 08-13-2023, 10:47 AM.

    #2
    Hello quicksandatl,

    Thanks for your post.

    This would require adding a secondary additional data series to your strategy and submitting orders to the added series.

    The AddDataSeries() method would be used to add the MES instrument to the NinjaScript strategy. Then, you could submit orders to the added series by using the Entry/Exit method syntax that allows you to specify the barsInProgressIndex you want to submit the order to.

    The primary data series the script is running on would be BarsInProgress 0. The first added series in the script will have a BarsInProgress of 1.

    Note that this would need to be manually programmed in a NinjaScript Editor window and cannot be set up in the Strategy Builder.

    For example, the syntax to enter a long market position would look like this:

    EnterLong(int barsInProgressIndex, int quantity, string signalName)

    To submit the order to the first added secondary series, the code might look something like this:

    EnterLong(1, 1, "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
    Working with Multi-Timeframe/Multi-Instrument NinjaScripts: https://ninjatrader.com/support/help...nstruments.htm

    Here is a reference sample demonstrating submitting orders to an added series: https://ninjatrader.com/support/help...ipt_strate.htm
    <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
      Thank you Brandon, that answers it perfectly.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      89 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X