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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      77 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X