Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
ACSIL - Getting the VPOC of a CUSTOM Volume Profile
Ok, so the solution is that this data can be approached using sc.GetStudyArrayUsingID. The VPOC data is held in the sc.Subgraph[1].Data array of the volume by price study.
So far I understand that the VPOC data is held in the sc.Subgraph[1].Data array of the volume by price study, so my idea is to use sc.GetStudyArrayUsingID in order to get the Data of the first subgraph of the Volume by Price study.
What I still don't understand is - Once I pulled the VPOC Subgraph data into a SCFloatArray array I need to specify an Index for the SCFloatArray variable.
for an example:
The volumebyprice study uses a structure which is available to your study too. You could consider using this structure directly: sc.VolumeAtPriceForBars.
My understanding id that the sc.VolumeAtPriceForBars refers to the volumes at the prices of a specific bar but here I am trying to get the poc of a custom Volume profile that spans through many bars. Am I missing something ?
I was surprised to find that the Volume Profile even appears on the TOOLS section because it is actually a study and not a tool. I will look into it although I doubt that the VPOC value will be there.
Thanks :-)
@ludvig, thank you very much for this code. There is a lot that i can learn from it.
My problem here is that this code requires inputs of the Number of bars in the profile and the beginning Bar. What I need is a code that will scan a chart for all existing profiles on the chart, calculate their POC values and then use those values for other purposes.
But still there is a A LOT that I can learn from your code and I appreciate it very much.