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.
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!
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
NinjaTrader
How to get volume at each price level of a historical day bar
Collapse
X
-
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. -
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.htmTick 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"
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
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by PaulMohn, Today, 03:49 AM
|
0 responses
7 views
0 likes
|
Last Post
by PaulMohn
Today, 03:49 AM
|
||
Started by inanazsocial, Today, 01:15 AM
|
1 response
9 views
0 likes
|
Last Post Today, 02:18 AM | ||
Started by rocketman7, Today, 02:12 AM
|
0 responses
10 views
0 likes
|
Last Post
by rocketman7
Today, 02:12 AM
|
||
Started by dustydbayer, Today, 01:59 AM
|
0 responses
4 views
0 likes
|
Last Post
by dustydbayer
Today, 01:59 AM
|
||
Started by trilliantrader, 04-18-2024, 08:16 AM
|
5 responses
23 views
0 likes
|
Last Post Today, 12:32 AM |
Comment