Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to get volume at each price level of a historical day bar

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

    How to get volume at each price level of a historical day bar

    Hi

    I would like to get the volume of contracts traded at each price level of a historical day bar. Is there a command like GetVolumeAt[double price] or some other method that accomplishes this? Please give me an idea how this can be achieved. Thanks in advance.

    #2
    Hello mbesha, and thank you for your question.

    Due to the way volume information comes in to NinjaTrader, the situation is slightly complicated. Between bar closings, which is when most NinjaScript strategies execute, volumes change several times.

    There is an indicator that will give you all the information you are looking for. That indicator is the VolumeProfile indicator. You will need to enable TickReplay for this indicator to work properly. I am providing some instructions on doing so.

    Originally posted by http://ninjatrader.com/support/helpGuides/nt8/en-us/?developing_for__tick_replay.htm
    Tick replay MUST be manually enabled on the primary Data Series and the option to allow this mode is hidden by default. The option to allow for Tick Replay is located in Tools > Options > Market Data > "Show Tick Replay"
    After enabling the checkbox, you can then access a chart's Data Series window (ctrl + f) and check the Tick Replay box that now shows.

    I would recommend studying the code for that indicator by opening it up in the NinjaScript editor, while also testing it in a chart with 10 second bars. Once you thoroughly understand this indicator and how it works, being able to access volume and any other MarketData information that occurs intra-bar will be very easy.

    We are happy to help with any questions that come up.
    Jessica P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    579 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    334 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    554 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    551 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X