Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

executing orders at 2 different instruments

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

    executing orders at 2 different instruments

    Hi!

    Please, I've this doubt: is it possible with NT7 and with the feature of multi-instrument chart, seeing different orders throwed by the same strategy to different instruments?, in example: imagine that there is one chart with the Corn futures and the Wheat futures contract, and I need a system that trades the spread, that is, I must buy one and sell the other, I know this is possible to do within a strategy, but will the chart show the orders in both instruments?

    Do I need to preconfigure the chart?

    Any suggestions please? I want to develop this spread strategy than any example or suggestion will be appreciated.

    Thank you!!

    #2
    joanNT you might find the attached indicator SpreadZScore worth looking at. I've been working on using it in a two instrument strategy where you are quoting in the market based on an implied spread, but that complex a strategy is beyond my current coding ability so it will take time.

    Apply the indicator to chart, add the second instrument and the number of contracts for both, and it plots the ZScore with markers at +/- 2 SDs.

    If this indicator gives you any ideas on things you need to effectively trade outrights as spreads please let me know so I can try to incorporate them.

    There is a comment in the code in the Initialize() section where I think there might be something NT7b10 doesn't like about this... sometimes. So just be aware of it.
    Attached Files

    Comment


      #3
      Hello joanNT,

      Unfortunately this is not supported in the same chart. Your strategy will run on one data series (either corn or wheat), which means that orders will only be displayed for this data series. It does not mean just because the chart has multiple data series, the strategy is applied to each data series.

      Your strategy runs on 1 data series in the chart. Additional data series added in your strategy code is behind the scene.

      If you create a separate chart for the second instrument, you will see executions.

      Comment


        #4
        Thank you very much! MXASJ.

        I downloaded another indicator that plots the spread, which I think it's more complex cause synchronitzation time bars, from http://www.ninjatrader-support2.com/...ghlight=spread

        But I'll take a look to yours.

        Thanks again

        Comment


          #5
          joanNT this is what I mean. In Sim I'm long 5 ZN 06-10 and short 3 ZB 06-10. Entries are on the right edge of the chart.

          The strategy code is no where near fully functional and I am sure there are better ways to do it, but I wanted to get it started.
          Attached Files

          Comment


            #6
            Hi Jason,

            when you are saying "If you create a separate chart for the second instrument, you will see executions." I suppose this second chart is whitout applying any strategy, simply the chart, right?

            Thanks

            Comment


              #7
              Originally posted by joanNT View Post
              Thank you very much! MXASJ.

              I downloaded another indicator that plots the spread, which I think it's more complex cause synchronitzation time bars, from http://www.ninjatrader-support2.com/...ghlight=spread

              But I'll take a look to yours.

              Thanks again
              . kdorden is lightyears ahead of me in coding ability and I'm quietly hoping he will post a spread trader at some point. In the meantime, I'm hacking away at it .

              Comment


                #8
                MXASJ,

                your attached image simply contradicts Jason reply, or, you are plotting the entries of 2nd instrument in the same chart....

                Let me know, please, how did you do? I took a look to the indicator code but I don't see anything..

                Thank you again

                Comment


                  #9
                  joanNT, this is just a MultiSeries chart with both instruments plotted that the spread would use, too. If you submit orders from a strategy to both you would see executions for both provided you create a chart containing both instruments...

                  Comment


                    #10
                    That's what I asked for, thanks Bertrand, sure it's my bad level of english sometimes I cannot explain things as I want

                    Comment


                      #11
                      Both Bertrand and Jason are correct. Try this:

                      Open a 30 min ZN chart
                      Apply the indicator. I used a quantity of 5 for the Quoted instrument, and 3 for the Hedge (in this case ZB 06-10).
                      Click OK to plot the ZScore of the 5*ZN-3*ZB spread (I forget the exact formula. Its in the indicator).
                      Add ZB as a second data series to the chart. You will see (if you traded it) where you went long one and short the other in the seperate panes.

                      That chart is from a strategy which is too buggy to post at this point in time, but you get an idea of what is possible.

                      Comment


                        #12
                        Thanks MXASJ, I'm developing another spread strategy I'll try these steps when finished and see if works.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        607 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        353 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        105 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        560 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        561 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X