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
Identify largest volume level
Collapse
X
-
Hello brucelevy,
Thank you for the post.
As far as I am aware, there is nothing built in to detect this and would require some logic to complete. You would very likely need to store this information yourself after calculating it and then reference it after the bar closes.
For this idea, you would likely need to use either a combination of adding a secondary tick series and logically using BarsInProgress to accumulate volume at various price levels or using OnMarketData and OnBarUpdate for the same purpose.
Using a Dictionary would likely be easiest to manage price levels. For example, you could check if a price key is in a dictionary or not, if it is not you would add it as a key to the dictionary with the value being the current volume. If it is in the dictionary, you could check if the current volume is greater than the volume stored in the dictionary at that level, if so increase the volume in the dictionary to match and if not, do nothing.
After the accumulation process described above, on the next bar you could access the dictionary and check specific price levels (keys) for their value (volume) which should be the accumulated MAX at that point for each level.
I am unaware of a specific sample that includes this type of logic to attach to this post. I would suggest reviewing the Dictionary samples on MSDN for some ideas on how to use dictionaries if that is not clear. There are a few samples near the bottom of the following page: https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Jon17, Today, 04:33 PM
|
0 responses
1 view
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
4 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
||
Started by timmbbo, Today, 08:59 AM
|
2 responses
10 views
0 likes
|
Last Post
by bltdavid
Today, 04:10 PM
|
||
Started by alifarahani, Today, 09:40 AM
|
6 responses
40 views
0 likes
|
Last Post
by alifarahani
Today, 03:18 PM
|
||
Started by Waxavi, Today, 02:10 AM
|
1 response
19 views
0 likes
|
Last Post Today, 03:03 PM |
Comment