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
Order Flow Volume Profile
Collapse
X
-
Hello Alex, Thanks for your reply.
If you need to sum up those values, use a for loop to iterate through each price level and have a running total I found this video that shows how to sum numbers with a for loop.
e.g.
Code:if (Bars == null) return; NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType = Bars.BarsSeries.BarsType as NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe; if (barsType == null) return; double TheSum = 0; try { for(int i = -5; i < 5; i++) { Print("Volume at " + (Close[0] + TickSize*i) + " V = " + (barsType.Volumes[CurrentBar].GetTotalVolumeForPrice(Close[0] + TickSize*i))); TheSum += (barsType.Volumes[CurrentBar].GetTotalVolumeForPrice(Close[0] + TickSize*i); } Print(""); } catch{}
Leave a comment:
-
Thanks Chris,
This solves half of the problem getting the total volume for the week.
The second part is to get the volume within the price range for the week. For example weekly price range is between 107 and 110 and I need the volume between 108 and 109 for that week.
From what I understand GetTotalVolumeForPrice gives the volume for a specific price. So is there easy way to get the sum for this range or I would have to get volume for every tick within the range and then sum those?
Also I'm looking for the week to current moment values, not current week. So if i'm calculating this on Thusday 8:00pm it should take values from previous Thursday 8:00pm to current Thursday 8:00m.
Thanks,
AlexLast edited by avdem; 05-16-2019, 09:43 PM.
Leave a comment:
-
Hello avdem, Thanks for your post, and welcome to the NinjaTrader forum.
If your inquiry is not related to the thread, please note to make a new thread in the future.
Your script will need to add a weekly data series and access the Volume series when BarsInProgress == 1. The attached script will print out the weekly volume at the end of every week.
Please let me know if you have any additional questions.Attached Files
Leave a comment:
-
Hi Chris,
Great. Thanks for the info and code.
I appreciate it.
- Likes 1
Leave a comment:
-
Hello i2w8am9ii2,
Thanks for the reply.
Yes you can use input parameters to pass in as long it occurs after you initialize the BarsType like in the help guide page:
Code:NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsType barsType = Bars.BarsSeries.BarsType as NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsType;
Leave a comment:
-
Hi Chris,
Great. Thanks for the link.
So would we be able to create input parameters for methods/properties such as the following?
GetAskVolumeForPrice
GetTotalVolumeForPrice
Or do such methods/properties (with Get in the front) only provide the volume numbers and cannot be set for use in an input parameter?
Leave a comment:
-
Hello i2w8am9ii2,
Thanks for the reply.
Here is the documentation on accessing Order Flow Volumetric bars:
Please let me know if I can assist further.
Leave a comment:
-
Hi Trader17,
Thanks for the info.
That is great.
Hopefully they will provide the functionality I'm looking for.
Leave a comment:
-
Originally posted by NinjaTrader_ChrisL View PostHello Trader17,
Thank you for the post.
Currently, Order Flow Volume Profile script access is not supported or documented yet. All documented Indicators will be listed here. There is a feature request to expose the plots of all the OrderFlow tools, I will add your vote to that feature request.
Please let me know if I can assist further.
Leave a comment:
-
Hello,
I have a similar question.
Are any Values from the Order Flow 'Volumetric Bars' exposed to Ninja Script?
Leave a comment:
-
Hello Trader17,
Thank you for the post.
Currently, Order Flow Volume Profile script access is not supported or documented yet. All documented Indicators will be listed here. There is a feature request to expose the plots of all the OrderFlow tools, I will add your vote to that feature request.
Please let me know if I can assist further.
- Likes 1
Leave a comment:
-
Order Flow Volume Profile
Are any Values from the Order Flow Volume Profile exposed to Ninja Script? Specifically the Value Area High, Value Area Low and the Point of Control.
Thank you.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by tony_28217, Today, 07:04 PM
|
0 responses
3 views
0 likes
|
Last Post
by tony_28217
Today, 07:04 PM
|
||
Started by flybuzz, Today, 10:33 AM
|
1 response
9 views
0 likes
|
Last Post
by flybuzz
Today, 06:59 PM
|
||
Started by spencerp92, 10-10-2023, 09:56 AM
|
4 responses
304 views
0 likes
|
Last Post
by flybuzz
Today, 06:45 PM
|
||
Started by samish18, Yesterday, 10:13 AM
|
1 response
25 views
0 likes
|
Last Post Today, 06:15 PM | ||
Started by Austiner87, Today, 05:02 PM
|
0 responses
7 views
0 likes
|
Last Post
by Austiner87
Today, 05:02 PM
|
Leave a comment: