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:	212
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:	238
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 NullPointStrategies, Today, 05:17 AM
                0 responses
                52 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