• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MarketData

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

    MarketData

    Hi,
    how can i add e second instrument with marketdata on a chart.
    I need the "change" and the "change%" only.
    BR
    Last edited by mate41; 06-09-2016, 07:09 AM.

    #2
    Hello mate41,

    This post is in the Indicator Development section of the forum. Are you wanting to use a script to add a visible second panel with a different data series?

    I am not aware of anyway to accomplish this with a NinjaScript.

    However, if you would like we can submit a feature request for this. It is up to our development to decide if an when to implement any feature request.

    Are you asking how to add a secondary series manually to your chart?

    This is done in the Data Series window from right-clicking the chart. Select the instrument, click the New button to add a secondary series, change any parameters on the right, click OK.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      1.I want a second instrument added like the attached screenshot for ex QQQ.
      2. if it could be done and better a second panel in the same chart.

      Number (1) could be done with a onbarsinprogress i presume + adding a second instrument.
      Attached Files

      Comment


        #4
        Hello mate41,

        I am not able to understand.

        Are you wanting to add a secondary instrument to a NinjaScript to use for calculations?
        Are you wanting to add the secondary series to the chart visually using a script?
        Are you wanting to add the secondary series to the chart visually manually?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I want in first instance adding a second instrument below and like that one i created in the screenshot.
          That way i become the primary instrument indications as in the screenshot, and below a want the same but with an other instrument.
          See the example in the screenshot.
          Attached Files
          Last edited by mate41; 06-09-2016, 08:01 AM.

          Comment


            #6
            Hello mate41,

            I am still not able to understand.
            Your screenshot is not a screenshot of a window in NinjaTrader.

            Lets start with one question at a time.

            Are you trying to write code into a script? Yes or No?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Yes, as i did with the first screenshot.....

              Comment


                #8
                Hello mate41,

                Your first screenshot is not a screenshot of a window in NinjaTrader.

                I also do not understand how either screenshot relates to a second instrument.

                You have confirmed that you are attempting to write code in a script.

                Are you trying to add a secondary series visually to your chart using a script?

                This is not possible.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Of course that screenshot is from a ninjatrader chart.
                  Here is a bigger part of that shart ......
                  Attached Files

                  Comment


                    #10
                    Hi mate41,

                    Thanks for the larger screenshot.

                    How does this screenshot relate to a secondary series?
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      It's related to the primary and only dataseries of this instrument.

                      Comment


                        #12
                        Hi mate41,

                        How is the screenshot related to your inquiry?
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by NinjaTrader_ChelseaB View Post
                          Hi mate41,

                          How is the screenshot related to your inquiry?
                          At the topright of the chart, I need the same type of values about another instrument (say QQQ), just below these of the primary instrument (in this case NQ).

                          Comment


                            #14
                            Hello mate41,

                            Thank you for confirming my question in post #4.

                            You are wanting to add a secondary instrument to a NinjaScript to use for calculations.

                            The screenshot is not really related, other than the fact that after you've added a secondary instrument you want to see the values for this in a text box.

                            To add a secondary series use the Add() method in Initialize()..

                            For example
                            Code:
                            Add("NQ 09-16", PeriodType.Minute, 1);
                            Below is a link to the help guide on Add().
                            http://ninjatrader.com/support/helpGuides/nt7/add3.htm

                            This will trigger OnBarUpdate once for the primary instrument and once for the secondary instrument. When the NQ 09-16 is triggering OnBarUpdate, BarsInProgress will be equal to 1 and the pricing information for this series will be from the Closes[1], Highs[1], Lows[1], Times[1], etc.

                            For example:
                            Code:
                            if (BarsInProgress == 1)
                            	DrawTextFixed("myTextBox", string.Format("{0} - Close: {1}", BarsArray[1].Instrument.FullName, Closes[1][0]), TextPosition.TopRight);
                            Below is a link to the help guide on BarsInProgress.
                            http://www.ninjatrader.com/support/h...inprogress.htm

                            And a link to the help guide on Multi-Time Frame & Instruments. Please see the section 'How Bar Data is Referenced', and 'Accessing the Price Data in a Multi-Bars NinjaScript'.
                            http://www.ninjatrader.com/support/h...nstruments.htm
                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              #15
                              Thanks Chelsia.
                              Last edited by mate41; 06-14-2016, 05:21 AM.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by faisamtrader, Today, 01:30 PM
                              1 response
                              7 views
                              0 likes
                              Last Post faisamtrader  
                              Started by idangre, 12-08-2016, 10:37 AM
                              3 responses
                              543 views
                              0 likes
                              Last Post NinjaTrader_Kate  
                              Started by priceisking, Today, 11:30 AM
                              1 response
                              9 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by traderpards, Today, 11:09 AM
                              4 responses
                              11 views
                              0 likes
                              Last Post traderpards  
                              Started by HinduMVP, Today, 10:49 AM
                              1 response
                              8 views
                              0 likes
                              Last Post NinjaTrader_Tyler  
                              Working...
                              X