mjj38
- ago
Ability to create volume profiles. With the work you have done for chart patterns, when applied to volume profiles, you could create some truly unique capabilities that I haven't seen before in other platforms. You could identify Low/High Volume Nodes, Profile Day Patterns (i.e. Trend, etc) and create automated strategies based on volume profiles which is generally hard to do.
10
2,572
Solved
40 Replies

Reply

Bookmark

Sort
- ago
#1
QUOTE:
I saw a change to widen that date dialog, so that's done.


Thank you!

@Glitch,
I understand what you mean by the deterministic nature of WL7. I think that is perfectly valid point and the patterns which I am talking about align with it. Patterns like consolidation, vcp, volume profile etc can be calculated as time-series indicators. But when they are shown in the chart, they can be shown only for the last bar.
For example take a look at this volume profile indicator on tradingview.com:
https://www.tradingview.com/script/r3VrWAO4-Volume-Profile/
So the last bar has a significant role when it comes to visual aspect of a chart.

The other case where horizontal scrolling does not help is this one - I calculate price movements for the last day, the last week, the last quarter and show it in the header section (top left side) as a quick glance over some key price movement numbers. This will not change when doing horizontal scrolling and is for only the last bar and not for the bar on the right side of the chart.

I am not sure if WL7 can support features like volume profile as of now, but will really like it to support it in the charting engine. WL7 is such a fantastic platform and will like to see it as the best charting software better than Tradingview and Marketsmith.
0
- ago
#2
Check out the "Price/Voume Distribution" and "Price/Volume Heat Map" sample strategies in the Community folder. That's one way how Volume Profile can be coded. Another option to implement it is the CDO API at: https://www.wealth-lab.com/Support/ExtensionApi/ChartDrawingObject

---
OFFTOPIC CONVERSATION HAS BEEN MOVED TO:
https://www.wealth-lab.com/Discussion/Price-Volume-strategies-missing-7425
1
Glitch8
 ( 13.30% )
- ago
#3
Let me take a crack at implementing a Volume Profile Chart Drawing Object!
1
Best Answer
Glitch8
 ( 13.30% )
- ago
#4
Hoping some Volume Profile expert can answer this:

Assume a daily bar has a range of 100 to 110, with a close at 105. And the Volume Profile happens to have $1 per horizontal profile line.

How is that daily bar's volume allocated to the Volume Profile?

It the volume added to each of the 10 Profile lines?
Is it added to only the 105 line?
Is it divided and added to each line?
0
- ago
#5
QUOTE:
Hoping some Volume Profile expert can answer this


In its purest form, the volume profile is derived from tick data.

Calculation algorithm:

First, identify the price at which the greatest volume occurred.

Then, sum the volumes occurring at the two prices directly above the high-volume price and compare it to the total volume of the two prices below the high-volume price. The dual price total with the highest volume becomes part of the value area. This process continues until 70 percent of the volume is reached.
0
Glitch8
 ( 13.30% )
- ago
#6
We don't have tick data, we're building it using OHLCV bar data only.
0
Glitch8
 ( 13.30% )
- ago
#7
And, I already have the Value Area calculations down.

We're leaning toward just assigning the volume to the volume profile bar corresponding to the closing price.
0
- ago
#8
To start with, I'm not a volume profile expert)).

It seems you are talking about transforming vertical volume to horizontal volume. This one was in my ideas storage). The idea seems a little bit crazy), as we are going to compete with those who use horizontal volumes made of tick data). So I'm sure there are not many experts in transforming vertical volume to horizontal volume)).

When I was thinking of it (I didn't think of it a lot though), my "simple" idea was the option "Is it divided and added to each line" equally. The very next idea was: if you have zero horizontal data all you have to make it more accurate is to go to a smaller TFs to get data for a larger TF. I mean dealing with 1 or 5 minute timeframe for compiling horizontal volume for Daily TF you'll be much more accurate than doing this strange things on Daily for Daily). Some side thoughts: 1. The more the window is the more accurate calculations are, so maybe Daily for Daily can be good enough maybe, 2. Even 1 minute for Daily will have large errors when volatility growth a lot, like panick sales or something.


P.S.
When I read this topic first, I thought it was about things like candle patterns job you have, but with vertical volume bars, like you get a sample on the chart, make it a pattern and then search for similar patterns.
0
Glitch8
 ( 13.30% )
- ago
#9
We will start by allocating a bar's volume to the single horizontal volume profile bar correspinding to the bar's closing price. Later, we might add an option to use granular data to get better precision, but that will slow down the performance of the volume profile.
0
- ago
#10
Granular will be slower with no doubt. Maybe you could precalculate it once (for historical data) and then just use it? I don't know how does this match you architecture though.
0
- ago
#12
I would like to refer again to the method described above, derived from tick data.

Perhaps it would also be possible not to have the volume profiles calculated on the clients in real time, but to generate them on the server side and provide the previous day's data from a data pool.

For backtesting, as a day trader, I am mainly interested in

- VAH (value are high) of the previous day
- VAL (value area low) of the previous day
- POC (point of control) of the previous day

A calculation for the current day (and also in general, as I understand it) can only be derived from tick data, and this requires extremely high computing power.
This does not correspond to the core of Wealth-Lab (easy to use backtesting software).

But retrieving from a data pool for past days would be a dream. Maybe to start on the values in the S&P500, NQ100 and DJ30.

But maybe we are talking about totally different ideas, then this post can also be considered obsolete.
0
Glitch8
 ( 13.30% )
- ago
#13
Yeah, we are not talking about suddenly building out a full blown service for precalculating and delivering Volume Profiles based on tick data from the server. If there's a demand for this (amongst the nearly 100 feature requests we already have) then we'd consider it. What we're developing now is a first step, a Volume Profile that can work with the data you have, applied to a specific lookback.

Now, a sensible next step might be to generate "per session" volume profiles for intraday charts like Trading View does.
0
- ago
#14
I am no expert on Volume Profile, but it makes sense to distribute the vertical volume data to all the horizontal volume bars where ever it spans. That way the pattern of the horizontal bars should look very similar whether the interval is $5 or $6 or whatever.
0
Glitch8
 ( 13.30% )
- ago
#15
I decided the same thing a little while ago :)
0
- ago
#16
@Glitch
Saw the video on the volume profile - looks really good! Awesome stuff!

I think instead of having volume profile coded directly in WealthLab, it would be even better to have a framework for this (data models and APIs), so that we can create volume profile and other indicators like this from the script itself.
0
Cone8
 ( 7.27% )
- ago
#17
QUOTE:
so that we can create volume profile and other indicators like this from the script itself.
In the video he covers the VolPro* indicators and the QuickRef of the VolumeProfile class. Are you looking for something else?
0
- ago
#18
This is great work. Would it be possible to ADD the ability to specify the period over which the profile is generate? By that I mean to have both the Lookback Period currently implemented (from t0 back any number of time periods) AND the ability to specify a user-defined period in the past.

Thanks.
0
Glitch8
 ( 13.30% )
- ago
#19
You can already create the VP based on any index in the historical data, AND specify the lookback. I'm not sure how much control we can provide??
0
- ago
#20
Right now I believe you only allow lookback periods anchored from the present time (t0). TradingView and most other platforms allow a user to define a general historical lookback period that need not end at the present time. This is useful functionality.
0
Glitch8
 ( 13.30% )
- ago
#21
No it need not be anchored at the present time. In fact you can even move the volume profile drawing object anywhere on the chart if you uncheck it’s “locked” property.
0
- ago
#22
Are you saying that I can have the tool draw a Volume Profile for a period starting from January 15 to January 29’th for example?
0
Cone8
 ( 7.27% )
- ago
#23
Refer to the image. Hover on the right and click on the big dot that appears to get the VP Properties window. Make sure that Snap to Last Bar is not checked. CLose the dialog, hover over the dot again, and drag the Volume Profile wherever you want it. You'll see it recalculated in real time as you drag it.

2
- ago
#24
This is a great feature! Love it a lot, especially the dragging and dropping option and the color encoding according to volume percentage. One can even drop multiple volume profiles on the chart. That's great!

I was trying to find an option to set the width (along the time axis) equal to the lookback period instead of a percentage value of the whole chart. Essentially, this places the maximum of the point of control to the position where the lookback period starts.

This would be really helpful to quickly asses the area over which the volume profile is accumulated over. Right now I have to convert form number of bars times timeframe minus the position of volume profile which is hard and easy to make mistakes.

Can I place a features request for this?

In a nutshell, I would like the width of the profile (along the time axis) to start where data accumulation starts and the width of the profile to end where data accumulation ends.
0
Cone8
 ( 7.27% )
- ago
#25
Is that just a hard way to say that you want an option for the Volume Profile's Lookback period to adjust to the visible chart area?
1
- ago
#26
Hey Cone, yes it is :D that would be great, a checkbox or something like that.
0
Cone8
 ( 7.27% )
- ago
#27
If Glitch allows it, I think we can easily solve this one for you with an Easter egg.

There's no reason to set a lookback of 1 bar for a Volume Profile, but if you do we'll calculate a lookback using the number of visible bars.

The only problem I see with this that we don't have an event to use to detect that the chart width or bar width changed, both of which would change the number of visible bars. In that case, to regenerate the profile, you'd have to open/close the settings box, or move the profile.
0
Glitch8
 ( 13.30% )
- ago
#28
If I’m reading this correctly, the original poster would like the physical width of the VP to align with the look back period, not having a dynamic look back period at all.
0
Cone8
 ( 7.27% )
- ago
#29
You're right. I was confused, and then I confused atradni!

Now that I understand what atradni really meant, this may be a troublesome implementation if the lookback extended past the visible chart area.

Maybe instead of changing everything that works so well, how about just displaying some marker, like "VP" or a "^", along the bottom of the price pane on the bar that starts the profile? If you don't see the symbol, then the start bar is left of the chart.
0
Glitch8
 ( 13.30% )
- ago
#30
I don’t think it would be problematic to fix the start of the vp at the first bar of the look back
0
Glitch8
 ( 13.30% )
- ago
#31
it should be made a new option though in the vp parameters
0
Cone8
 ( 7.27% )
- ago
#32
Instead of another option in an already long list, how about using 0 Horizontal Coverage as the control value?
0
Glitch8
 ( 13.30% )
- ago
#33
That's non-intuitive.
0
mjj38
- ago
#34
Would it be possible to add to the Chart Drawing Object / Indicator:
- Options for lookback to be based on new Day, Week, Month, Quarter, Year and Option Expiry ?
- Produce multiple profiles going back in time (i.e. a profile for every day). Much of the benefit of market profile analysis is based on how the different profiles interact with each other. Or combining profiles together (particularly for inside days).
- Any thoughts on how to calculate Low/High Volume Nodes? That is a major key to automating the calculation of those regions as they then tend to indicate potential turning points in price.
- It would also be good to plot the evolving values (i.e. the evolving point of control for the day) same for value area highs and lows as that would enable back-testing.
- Is there an example trading strategy utilizing volume profiles? Ideally something super simple such as 1 minute chart buying the value area low and selling at the value area high on the daily volume profile.
0
- ago
#35
I just ran the WL Build 76 code example for VolumeProfile on AAPL and I don't get anything. Is this code example broken?

It would be nice if the code example showed how to get a list of "Items" that the strategy could query in the VolumeProfile object.
0
- ago
#36
No, the code example isn't broken and its generated output on AAPL's chart reflects the embedded YouTube video for me.
0
- ago
#37
I found the problem. If you type "VolumeProfile" in the Properties/Methods search box when UserStrategyBase is selected as the Class, the search returns the VolumeProfile docs but not the correct sample code to use. So this is a problem with how search is working, not a problem with VolumeProfile itself.

One needs to type "VolumeProfile" as the Class to search for, not the Method. (I didn't know VolumeProfile was a class when I was doing the search.)
1
Cone8
 ( 7.27% )
- ago
#38
QUOTE:
Is this code example broken?
It doesn't look right for me either. I'll investigate.

This is what we're looking at -
0
Cone8
 ( 7.27% )
- ago
#39
Okay, examples for some of the the VolumeProfile properties, like the one above for GenerateVolumeProfile() that "displays the Point of Control of the 5 most recent Volume Profiles with a 20 bar lookback", just use DrawHorzLine() to show the price levels.

The best C# example - the one that looks like a VolumeProfile - is for the Items property.
1
Cone8
 ( 7.27% )
- ago
#40
I'll change that sample code to show the current Point of Control using a dot.
This is for the last 20 bars.

2

Reply

Bookmark

Sort