Stock.Indicators icon indicating copy to clipboard operation
Stock.Indicators copied to clipboard

Volume profile

Open arcadeindy opened this issue 4 years ago • 13 comments

Please add Session Volume indicator [Volume Profile].

arcadeindy avatar Feb 12 '21 04:02 arcadeindy

I’ll take a look at it. Do you have a good website reference to it that I can review.

DaveSkender avatar Feb 12 '21 05:02 DaveSkender

https://www.tradingview.com/blog/en/session-volume-hd-16628/ https://th.tradingview.com/chart/ETHUSD/ztOxu8Hm-Volume-Profile-Fixed-Range-Session-Volume-Visible-Range/

Thank you for your reply.

arcadeindy avatar Feb 12 '21 05:02 arcadeindy

We tend to avoid using random user customized indicators in this library, as in your link. Is there a more reputable version and source available? I’d like to stay with things that’s are published or recognized in professional journals or books.

I would like to find something like this. I think it’s a good indicator type to add.

image

DaveSkender avatar Feb 12 '21 05:02 DaveSkender

Thank you sir.

arcadeindy avatar Mar 14 '21 02:03 arcadeindy

I'll continue to look for a version of a volume profile that we can use, so thank you for the idea. If you see something in your journey that might work, let us know.

DaveSkender avatar Mar 14 '21 17:03 DaveSkender

@JGronholz, fyi

DaveSkender avatar Jun 30 '22 19:06 DaveSkender

Hello, again, Dave! I couldn't find the source for TradingView's VP indicator, so I just asked Google what it was doing, instead, then wrote my own. I don't have any references to cite, unit tests, etc., etc., but I do have some free code for you that made this chart. I'll work through the contributing guidelines asap, but am currently unaware of the proper way to give you this. 🤷‍♀️🙏

Volume profile diagram 1

JGronholz avatar Jul 01 '22 16:07 JGronholz

This was to be part of my documentation, showing the "cliffs" where the price likes to stop.

Volume profile diagram 2

JGronholz avatar Jul 01 '22 16:07 JGronholz

To implement "Visible Range," just filter the quotes, like so:

results[klineInterval] = QuoteSource.Quotes[klineInterval].Where((quote) => { return ((quote.Date >= Chart.StartDate) && (quote.Date <= Chart.EndDate)); }).GetVpvr(Chart.YInterval / 4);

JGronholz avatar Jul 01 '22 16:07 JGronholz

TradingView's VP indicator appears to output only the cumulative total, for only the last quote. I liked how your indicators are all time-series, and made this one the same. Each quote generates one VpvrResult, which each contain a list of VpvrValues(price/volume tuple) for that specific quote. The cumulative profile for a date is recursively assembled from those values.

When you move the cursor around, TradingView's VP indicator uses the Y value only. Since the output from my indicator can be indexed by date (X), before price (Y), the chart is able to visualize subsets of the volume profile. As far as I know, you cannot "time-step" like that, with TradingView's indicator. I often have to pan/zoom to impractical views of the candles, just to get their VPVR to show me what(when) I want. I began to work on a caching mechanism to improve performance, but put that on hold, for now. Currently, it's very functional.

When the cursor is not within my chart's ClientBounds, my app uses the last quote, producing an experience similar to TradingView's.

JGronholz avatar Jul 01 '22 17:07 JGronholz

Volume Profile is one of the most powerful indicators, IMO, and is unavailable without a TradingView subscription. Coincidence? 😁

JGronholz avatar Jul 01 '22 17:07 JGronholz

is unavailable without a TradingView subscription. Coincidence? 😁

It's a business model!

DaveSkender avatar Jul 01 '22 19:07 DaveSkender

Do you have any plan or intention on adding Volume Profile indicator to the project? more info about this indicator: https://www.tradingview.com/support/solutions/43000502040-volume-profile/

_Originally posted by @Cage-e in https://github.com/DaveSkender/Stock.Indicators/discussions/858

DaveSkender avatar Aug 03 '22 13:08 DaveSkender