Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sample Pair Trading Strategy using Strategy Builder?

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

    #16
    I've created a short video example with a simple script that demonstrates filling a strategy order for two instruments in one script: https://Paul-ninjaTrader.tinytake.co...IyM185MzgzOTkz
    Do you have a template for this example?

    Comment


      #17
      Hello JTizz,

      Paul is currently out of the office. I don't have anything to share for templates that would be used for the script or to import and set up.

      Strategy Builder strategies only allow submitting orders to the primary data series, so this would have to be done in unlocked code. It maybe helpful to pause Paul's video and set up the OnBarUpdate logic line by line, and then check how each method is used. (Referencing order method overloads and Multi Time Frame and Instruments documentation to see how each method is used and how BarsInProgress is used in the script.)

      Multi Time Frame and Instruments - https://ninjatrader.com/support/help...nstruments.htm

      Order methods - https://ninjatrader.com/support/help...er_methods.htm

      Comment


        #18
        Hi Paul, great video, thanks for posting. I followed your video and got everything set up but when looking at strategies drop down it shows the secondary chart my doesn't take the trades, any info you are able to provide will be helpful Thx

        Comment


          #19
          post Click image for larger version

Name:	azzzz.jpg
Views:	215
Size:	17.2 KB
ID:	1195732

          Comment


            #20
            Hello JTizz,

            It looks like you used "MES" but maybe you wanted to use "MES 06-22" in AddDataSeries.

            Note that when you are adding futures contracts with AddDataSeries, the full name (instrument + expiry) must be given.

            Comment


              #21
              It strange, when I add the 6-22 it doesn't allow me to enable. Click image for larger version

Name:	6-22.jpg
Views:	242
Size:	71.9 KB
ID:	1195796

              Comment


                #22
                Hello JTizz,

                Please use the instrument name as it would be seen in an Instrument Selector. "MES 06-22"
                Attached Files

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by CarlTrading, 03-31-2026, 09:41 PM
                1 response
                82 views
                1 like
                Last Post NinjaTrader_ChelseaB  
                Started by CarlTrading, 04-01-2026, 02:41 AM
                0 responses
                43 views
                0 likes
                Last Post CarlTrading  
                Started by CaptainJack, 03-31-2026, 11:44 PM
                0 responses
                64 views
                2 likes
                Last Post CaptainJack  
                Started by CarlTrading, 03-30-2026, 11:51 AM
                0 responses
                68 views
                0 likes
                Last Post CarlTrading  
                Started by CarlTrading, 03-30-2026, 11:48 AM
                0 responses
                56 views
                0 likes
                Last Post CarlTrading  
                Working...
                X