Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Historical Time and Sales

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

    Historical Time and Sales

    Hello Support --

    I'd like to build the script which gives me historical Time and Sales data. The problem is how to paint the prints into blue, green and other T&S colores. Where get the data for it.

    Regards.

    #2
    Hello alex_bbfg,

    Thank you for your post.

    Are you using your own custom form or the Output window in NinjaTrader? If you are using the Output window unfortunately there is no option to change color.

    Comment


      #3
      Hello PatrickH --

      Thank you for quick reply

      I think it will print on a chart. My question is how to determin whether the price of print at bid or at ask and so on.. using historical data. What are the methods to do this.

      Regards.

      Comment


        #4
        Hello alex_bbfg,

        Thank you for your response.

        You would need to add an additional bar series added to the code for Bid and Ask. You would then call the series and compare against the Closes[0][0] to see if the last price was bid or ask.

        For information on using multiple series please visit the following link: http://www.ninjatrader.com/support/h...nstruments.htm

        Please let me know if I may be of further assistance.

        Comment


          #5
          Hello PatrickH --

          Thank you for you reply.

          Well,

          for ask prises I use Add(PeriodType.Tick, 1, MarketDataType.Ask);
          for bid prises I use Add(PeriodType.Tick, 1, MarketDataType.Bid);
          for tick data I use Add(PeriodType.Tick, 1);

          for blue color print I have Closes[3][15] == Closes[2][5]
          for green color print I have Closes[3][15] == Closes[1][5]

          am I right?

          The other issue is the data volume added. I'm going to work with tick historical data. How can I specify the volume of data or bars which I whant to add?

          Regards.

          Comment


            #6
            Hi alex_bbfg,

            With your code:
            Closes[3][15] == Closes[2][5]

            This would compare the close price of the 4th data series 15 bars ago, with the close price of the 3rd data series 5 bars ago. In other words, you are not comparing the same bar and its unlikely that they would be equal.

            To call the volume of the current bar (0 bars ago) for the second data series use Volumes[1][0].
            http://www.ninjatrader.com/support/h...t7/volumes.htm
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hi ChelseaB --

              Thank you very mach for your reply.

              that is the mistyping the right code is Closes[3][15] == Closes[2][15]. Im going to attach the script to a charts of different time frame but work with tick data.

              My question of the vilume actully regard to numbers of bars added in additinal data series. I have 300 dayly bars downloaded on my charts and if I add additional tick data series in my script it download ticks data for 300 days, wih is too many. I want to download ticks only for couple of hours. How can I do it?

              Regards/

              Comment


                #8
                Hello alex_bbfg,

                Thank you for your response.

                Unfortunately, this is not possible. The bars will be restricted to the session template and number of bars/days as the primary series.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by elirion, Today, 01:36 AM
                0 responses
                3 views
                0 likes
                Last Post elirion
                by elirion
                 
                Started by gentlebenthebear, Today, 01:30 AM
                0 responses
                4 views
                0 likes
                Last Post gentlebenthebear  
                Started by samish18, Yesterday, 08:31 AM
                2 responses
                9 views
                0 likes
                Last Post elirion
                by elirion
                 
                Started by Mestor, 03-10-2023, 01:50 AM
                16 responses
                391 views
                0 likes
                Last Post z.franck  
                Started by rtwave, 04-12-2024, 09:30 AM
                4 responses
                34 views
                0 likes
                Last Post rtwave
                by rtwave
                 
                Working...
                X