Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Number of trades indicator

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

    Number of trades indicator

    Hi,

    I would like to develop

    1) a market analyzer column that shows today's number of trades for an instrument
    2) and a chart indicator that is based on the number of trades per minute an instrument has.

    Both of these features seem very similar to me, and I plan to use the time and sales data for this.

    Is this possible? Can you give me a brief hint of where to start my code for this please?

    thanks!

    #2
    Hello RT001,

    Thank you for your note.

    To clarify, it sounds like you're basically looking for a Daily Volume column and an indicator that would display the current volume of the latest 1 minute bar, is that correct?

    We do have a built in Daily Volume column that could be used if your data provider provides that information that can be found by right clicking on the Market Analyzer > Columns > Daily Volume. You could also consider using an Indicator column, selecting the VOL indicator, and choosing to use a daily data series.

    As far as displaying volume information on the chart, you could create an indicator that adds a 1 minute data series, then gets the most recent volume from that to display how much volume there is in the past minute. You could just print that to the chart using a text drawing object like Draw.TextFixed. I'm attaching a simple example indicator that will get the current 1 minute bar's volume and the prior 1 minute bar's volume and print those to the chart.

    If this is not what you're wanting to do, if you could further clarify what information you're wanting that would be helpful.

    Thanks in advance; I look forward to assisting you further.
    Attached Files

    Comment


      #3
      Hi Kate! thanks for your help.

      No really I am looking to display / manipulate with script the number of trades (as output by the T&S window), not the volume.

      So, to put a simple example, in my custom market analyzer column, if there has been 1000 transactions in the day of people buying / selling 100 shares each, it would display 1000 as the number. I am looking at the number of trades for a specific instrument, to basically have a clear overview of the tape speed (number of prints).

      Volume is an aggregated number and I am looking for granular overview of that volume.

      Comment


        #4
        Hello RT001,

        Thank you for your reply.

        You can't access the data shown in the T&S window directly via NinjaScript, but you can essentially replicate its behavior using OnMarketData. Here's a link to a prior forum post from one of my colleagues that demonstrates getting T&S style prints that should be a helpful starting point:



        Please let us know if we may be of further assistance to you.

        Comment


          #5
          Awesome!! Thank you very much Kate!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          646 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          367 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          107 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          569 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          573 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X