Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Execute a different pair's order from one pairs strategy?

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

    Execute a different pair's order from one pairs strategy?

    Lets say I have a strategy on USD/JPY, and under certain conditions I want to not only place a long or short order for USD/JPY, but I also want to place an order for USD/CHF or another pair, how do I do that from the same strategy? I don't want to pull in the data series for the other instrument if possible because in theory it can be any other forex pair depending on the conditions and I would have way too many data series.

    #2
    Hello ErikY,

    You can do that by adding secondary series to the strategy and then placing your logic in the appropriate BarsInProgress conditions. That will let you do calculations on more than 1 instrument or submit orders to them as well. We have a guide that goes over this concept here: https://ninjatrader.com/support/help...nstruments.htm

    Regarding the data, the data is supplied for the instruments you select so as long as you use two different instruments they would have separate data streams.

    Comment


      #3
      Jesse,

      Thanks, is there any way to do this without having the second or tertiary or more data series? the problem I have is I don't know which pair it will be that I would want to execute, so in theory I may need up to 12 or so data series to do this. Can i do it without having the data series be in the strategy?

      Comment


        #4
        Hello ErikY,

        To submit orders to an instrument you need to subscribe to its data, to do that from one strategy would require adding secondary series.

        If you are unsure which instrument you would want to execute orders to you may need to revisit your trading goal to get a more specific scenario that you wanted to work on in a Strategy. To have a strategy execute trades to an instrument it needs to either be the series which you apply the strategy to or a secondary series that you added specifically in code. The strategy needs specifics in order to work toward its goal.

        Comment


          #5
          OK, understand, thanks. Is having 12 or so instruments in a strategy do-able, or would it completely bog down Ninja?

          Comment


            #6
            Hello ErikY,

            That would work fine. If you are using more granular series like tick series that can add to the load time however once in realtime that would be like having 12 charts open to those instruments, it wouldn't be that much of a resource toll.

            Comment


              #7
              got it, thanks, so just to clarify, if the only purpose in the strategy is to trade another pair, I could probably do something like a 1 week candle data series for the other pairs to limit the amount of data coming in? I won't be doing any calculations on the data at all, that will come from outside the strategy for which pair I trade

              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