Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Opening Orders on a different Instrument

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

    Opening Orders on a different Instrument

    Hi,

    I have a strategy based on YM futures. I get entry and exit signals from this strategy which is attached to the YM chart, but I only want to open orders on the MYM due to smaller capital requirements. I saw that you can add another data series, but that is not what I require. To explain more simply:

    1) Strategy finds entry / exit signals on the YM chart
    2) I want to enter into positions for the MYM based on the above signals.
    3) Strategy is attached to the YM chart, and I need to open positions on the MYM instrument.

    Thanks in advance!

    #2
    Hello vonboettichert,

    Thank you for your post.

    This would, in fact, require an additional data series. I'd suggest making MYM the primary data series, and YM the secondary series so you can see the trades when you apply the strategy to a chart.

    I'm attaching a simple Strategy Builder strategy that places trades on MYM based YM data. Note that this needs to be run on an MYM chart. I suggest both checking it out in the Builder and also unlocking the code so you can see the syntax necessary.

    Also, here is a link to our help guide that goes over Multi-Instrument strategies:

    https://ninjatrader.com/support/help...nstruments.htm

    Please let us know if we may be of further assistance to you.
    Attached Files

    Comment


      #3
      I am doing something similar. My strategy ran as expected on Stock Instruments. I added additional data for MNQ 09-22 to create condition sets for Exits and Entries of the Primary Instrument.

      When backtesting most of my trades are on the primary, but I have a few random trades on the Secondary MNQ instrument

      My entry order is as follows\

      EnterLong(Convert.ToInt32(DefaultQuantity), @"Long1");

      Update:
      I was able to avoid the wrong instrument by adding the following to all condition sets for Entries

      && (BarsInProgress == 0)

      Thanks
      Last edited by DTSSTS; 08-27-2022, 12:40 PM.

      Comment


        #4
        Hello DTSSTS,

        When you add a series with AddDataSeries() all series will update OnBarUpdate().

        Whichever BarsInProgress is updating in OnBarUpdate() will be the default for price series and where orders are sent, unless the barsInProgressIndex is specified with the order method.

        EnterLong(int barsInProgressIndex, int quantity, string signalName)


        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        62 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        134 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        75 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        50 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X