Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple instrument chart

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

    Multiple instrument chart

    Is there a way to chart multiple instruments (5 or 6) on a chart (or as an indicator) within NT? Ideally as a percentage change from session open or a specified point?

    #2
    Hello,

    Thanks for your forum post.

    This is absolutely possible with a NinjaScript indicator.

    You can contact one of our NinjaScript consultants to assist you with coding this or you can use our NinjaScript guide and forums to code this indicator yourself if you are a programmer.


    NinjaScript Consultants:


    NinjaScript Help Guide:


    NinjaTrader Support Forum:


    Let me know if I can be of further assistance.

    Comment


      #3
      i know this is possible i was asking if you guys have one available or if i have to do it myself?
      so I take it you do not have one or do not want to share it as you would rather make money on the consulting jobs?

      Comment


        #4
        Hello,

        Here at NinjaTrader we do not create code for clients as this is what the NinjaScript Consultants are for, NinjaTrader has no ties to NinjaScript consultants.

        Please see the following link on how to do this if you want to code it yourself. This is not too bad to code however does involve somewhat involved multi series coding, you need too add in the bar series and simply do any percentage calculation you want to do then output that as a plot.

        Samples and INstructions Here:



        Let me know if I can be of further assistance.

        Comment


          #5
          Hi nightriderx

          You may consider this indicator: http://www.ninjatrader.com/support/f...d=1&linkid=270
          TimNinjaTrader Customer Service

          Comment


            #6
            Great! thank you very much, I appreciate your help!

            Comment


              #7
              Hello,

              No problem. Have a great day.


              Let me know if I can be of further assistance.

              Comment


                #8
                Hi, so I got this working like i want on the same instrument as my chart, but when i try to change the instrument to a difft one via parameters it gives me an out of bounds error... any ideas why this would be?
                this same exact method is used with indicators that you guys have made in the pairs suite...

                Comment


                  #9
                  Hello,

                  Please insure that you are checking to make sure you have enough bars of data before calculating the indicator for the calculations you need.



                  Let me know if I can be of further assistance.

                  Comment


                    #10
                    actually even when i try the pairs correlation indicator now its not working, gives me a "value outside of valid range" error...

                    Comment


                      #11
                      Hello,

                      Please check previous response below. Should do the trick.

                      Comment


                        #12
                        ok. well you were right about not having enough bars, but it doesnt make sense. The indicator is comparing the 10th bar back to the current one, yet i am getting the error if i have less than 2000 bars loaded... how can this be?

                        Comment


                          #13
                          Hello,

                          Would need you to post your code.here so that I can take a look at it to see what you got going on.

                          I look forward to assisting you further.

                          Comment


                            #14
                            #region Variables
                            private int lookBack = 100;
                            private string instrument1 = "ZB 12-10";
                            #endregion
                            protected override void Initialize()
                            {
                            Add(Instrument1, PeriodType.Minute,1);
                            Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Change"));
                            Overlay = false;
                            }

                            protected override void OnBarUpdate()
                            {
                            if (CurrentBar < (LookBack ))
                            return;


                            Change.Set((Closes[1][0] - Closes[1][LookBack]) / Closes[1][0]);
                            }

                            #region Properties

                            [Browsable(false)]
                            [XmlIgnore()]
                            public DataSeries Change
                            {
                            get { return Values[0]; }
                            }

                            [Description("")]
                            [GridCategory("Look Back")]
                            public int LookBack
                            {
                            get { return lookBack; }
                            set { lookBack = Math.Max(1, value); }
                            }


                            [Description("")]
                            [GridCategory("Instrument")]
                            public string Instrument1
                            {
                            get { return instrument1; }
                            set { instrument1 = value; }
                            }


                            #endregion

                            Comment


                              #15
                              Hello,

                              Heres the issue:

                              if (CurrentBar < (LookBack ))
                              return;


                              Since your in multi series you have to check both bar series.



                              If you use the exact example in this page should do the trick.

                              I look forward to assisting you further.

                              Comment

                              Latest Posts

                              Collapse

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