Thank you.
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 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.Chris L.NinjaTrader Customer Service
- Likes 1
-
Hello,
I have a similar question.
Are any Values from the Order Flow 'Volumetric Bars' exposed to Ninja Script?
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.
Comment
-
Hi Trader17,
Thanks for the info.
That is great.
Hopefully they will provide the functionality I'm looking for.
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?
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;
Chris L.NinjaTrader Customer Service
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 FilesChris L.NinjaTrader Customer Service
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.
Comment
-
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{}
Chris L.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Brevo, Today, 01:45 AM
|
0 responses
6 views
0 likes
|
Last Post
by Brevo
Today, 01:45 AM
|
||
Started by aussugardefender, Today, 01:07 AM
|
0 responses
3 views
0 likes
|
Last Post Today, 01:07 AM | ||
Started by pvincent, 06-23-2022, 12:53 PM
|
14 responses
242 views
0 likes
|
Last Post
by Nyman
Today, 12:47 AM
|
||
Started by TraderG23, 12-08-2023, 07:56 AM
|
9 responses
384 views
1 like
|
Last Post
by Gavini
Today, 12:29 AM
|
||
Started by oviejo, Today, 12:28 AM
|
0 responses
6 views
0 likes
|
Last Post
by oviejo
Today, 12:28 AM
|
Comment