Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7 Spread Indicator

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

    NT7 Spread Indicator

    Here's a simple Multi-Instrument "Spread" indicator for NT7. I'm posting it here because I'm guessing that NinjaTrader probably doesn't want NT7 indicators in the Indicators area yet.

    It plots the net price of a combination of 2 instruments.

    Parameters are the symbol name of the secondary instrument, and (long or short) quantities for both instruments. If you use the deault quantities of +1/-1, it will plot the difference of the 2 prices.

    It uses the PointValue entries for each instrument from the Instrument Manager as a multiplier.

    It should work well with Interactive Brokers' extremely useful "Generic Combo" orders, which allow you to define a synthetic "combo" security that can be traded like a single security.
    Attached Files
    Last edited by kdoren; 02-07-2010, 07:11 AM. Reason: Removed Spread.zip file, please see post #11 for an updated version.

    #2
    >> I'm guessing that NinjaTrader probably doesn't want NT7 indicators in the Indicators area yet
    Na, that's fine. Would be great if you marked it accordingly. Thanks for your contribution.

    Comment


      #3
      Here's an updated spread indicator which allows the use of non-integer quantities, and prints the fullname (which includes contract expiry) in the chart label.

      In the attached chart, quantities of +.001/-.001 are used to "undo" the contract multiplier, and plot the spread of the raw price.

      -Kevin
      Attached Files
      Last edited by kdoren; 02-07-2010, 07:12 AM. Reason: Removed Spread.zip file, please see post #11 for an updated version.

      Comment


        #4
        Hi kdoren and Dierk

        Have you figured out on how to get price qoutes from combined combo intrument that was created in IB.

        It looks like, once creted in IB, the combo behaves as a single instrument and in IB you can use charts on it, trade it, set stop-losses, etc.

        I was wondering, if anyhow it is possible to define this combo instrument in NT instrument manager and work with this new instrument as it was a real stock. All life of pair-traders / spread traders would of become suddenly a paradise.

        Any possibilities ?

        Comment


          #5
          I use combo orders extensively (they are great), but I enter them manually. I don't know any way to handle them in NT, and I really wish there was a way to do it. Does anyone know a way to do it? Or is there any chance of getting it implemented?

          Comment


            #6
            Originally posted by kdoren View Post
            I use combo orders extensively (they are great), but I enter them manually. I don't know any way to handle them in NT, and I really wish there was a way to do it. Does anyone know a way to do it? Or is there any chance of getting it implemented?
            Yes. this feature could be a breakthrough in pairtrading and spreadtrading with using Ninja and IB.

            The most recent feature in IB was introduced in version 898 ( I Guess ) is stock/stock combo. It is most demanded by pairtraders. Before, IB had only futures spreads and other, but not stock/stock. It is looking nice on IB side now, but no idea how to make it visible in Ninja. As IT guy, I think it is very easy to implement as Dynamic instrument ( NT guys call them on-the-fly ? ) and use as long as it is visible in IB. More like a dream

            Comment


              #7
              Originally posted by kdoren View Post
              Here's an updated spread indicator which allows the use of non-integer quantities, and prints the fullname (which includes contract expiry) in the chart label.

              In the attached chart, quantities of +.001/-.001 are used to "undo" the contract multiplier, and plot the spread of the raw price.

              -Kevin
              Hi
              This indicator no longer works on NT Beta8, anybody else facing the same issue??

              Regards,

              SDG

              Comment


                #8
                Which exact error (if any) do you get when you apply it to a chart on the new beta 8?

                Thanks
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Here's my current version; I did a quick test and it appears to be working on NT7B8. This version should be more robust, in the sense of plotting time-correct output even in real time with instruments with light trading or missing bars.
                  Last edited by kdoren; 02-07-2010, 07:12 AM. Reason: Removed Spread.zip file, please see post #11 for an updated version.

                  Comment


                    #10
                    Originally posted by kdoren View Post
                    Here's my current version; I did a quick test and it appears to be working on NT7B8
                    Thanks!

                    I think I was getting the Scale Justification property wrong. I have now set it to overlay and it works. So probably nothing wrong with the previous version and NT 7 Beta8.

                    SDG

                    Comment


                      #11
                      Here's an updated Spread indicator which fixes a potential synchronization problem. Please let me know any problems or comments.

                      With this, and all multi-instrument indicators, currently you must add the secondary data series to the chart before applying the indicator. There are currently bugs in NT7 which will cause problems if an indicator refers to instrument data series which are not displayed on the chart.

                      The indicator's "Symbol2" parameter defaults to the secondary instrument displayed on the chart, so you don't need to enter the symbol again.

                      Update 4/7/10: Removed Spread.zip file, please see Indicators area for an updated version:
                      http://www.ninjatrader-support2.com/...d=1&linkid=289
                      Last edited by kdoren; 04-07-2010, 03:10 AM. Reason: Removed Spread.zip file, please see Indicators area for updated version

                      Comment


                        #12
                        Thanks for that Kevin. Man you are on a roll!

                        I can do the "indicator on indicator" thing on your spread plot with an EMA, but for some reason some other indicators do not plot (HMA and Bollinger Bands come to mind). Not sure if that's an NT7 thing or an indicator thing.

                        A cool addition worth considering is being able to select if the legs are based on bid, ask, or last price. I haven't looked to deep into your code to see how easy/hard that would be.

                        I've been trying to play with some trade logic where, for example, the spread between two instruments is the ask of one leg minus the bid of the other, and you would buy/sell that spread based on the value of spread being n standard deviations from the spreads n period moving average.

                        Comment


                          #13
                          Indicators-on-indicators is all screwed up in NT7, and poorly architected as well. There is no predicting what will happen.

                          Also, when passing the output of one indicator to another, instead of passing "no output" like it should, NT7 passes the closing price of the primary instrument.

                          This is a major design flaw in NT7, an incredibly bad mistake. [see attached chart] If you take, say, a 14-period SMA of a 36-period beta (say DIA vs ^SP500), what will display is: 19 bars of no output; 16 periods of the SMA of DIA (roughly 100), then 13 periods of an SMA which is a mixture of the Close of DIA and the output of Beta (100 declining down to 1) then finally the SMA of the Beta indicator output.

                          Your eye can see it's wrong and ignore it, but it's useless if you want to apply any trading rules to it, unless you're careful to write rules to ignore it.

                          As far as ETFs is concerned, there should be no difference between ETFs and any other symbol. They work OK for me (NT7 occasionally stops responding and I have to kill it, but I believe that's a problem with NT7 and not with my indicators).
                          Attached Files

                          Comment


                            #14
                            kdoren,

                            The issues you are facing is already under investigation. Likely all these other reports you have are all tied to the same issue.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              A lower priority feature request: When applying an indicator to an indicator, often the underlying indicator will already be displayed on the chart. It would make things much easier if the "Input Series" dialog box would display the indicators currently on the chart, not just the Data Series on the chart and the laundry list of all indicators.

                              That way if you wanted to display, say, an SMA of some indicator that was already on the chart, you could do it with a couple of mouse clicks, and you wouldn't have to find the indicator in the laundry list and enter the parameters all over again.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by AaronKoRn, Yesterday, 09:49 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post AaronKoRn  
                              Started by carnitron, Yesterday, 08:42 PM
                              0 responses
                              10 views
                              0 likes
                              Last Post carnitron  
                              Started by strategist007, Yesterday, 07:51 PM
                              0 responses
                              12 views
                              0 likes
                              Last Post strategist007  
                              Started by StockTrader88, 03-06-2021, 08:58 AM
                              44 responses
                              3,982 views
                              3 likes
                              Last Post jhudas88  
                              Started by rbeckmann05, Yesterday, 06:48 PM
                              0 responses
                              10 views
                              0 likes
                              Last Post rbeckmann05  
                              Working...
                              X