TradingView
RicardoSantos
31 יולי 2022 10:57

Multiple Frequency Volatility Correlation 

Bitcoin / U.S. dollarBitstamp

תיאור

This is a complex indicator that looks to provide some insight into the correlation between volume and price volatility.
Rising volatility is depicted with the color green while falling volatility is depicted with purple.
Lightness of the color is used to depict the length of the window used, darker == shorter in the 2 -> 512 window range.

הערות שחרור

added a histogram to show last and recent(10 bars) distribution of correlation

הערות שחרור

updated histogram calculation, it now allows the input length of the aggregation of values, added values display on histogram bars.

הערות שחרור

added labels with some description.
תגובות
djmad
great stuff

i maight borrow your vc function for some experiments and integrate some Alarms :-)

didnt know the ta.correalation at all... interesting
PineCoders
kakola
I've no idea how to use it, but I like the colors.
muhd_nihal
How to use it?
peacefulLizard50262
Two things I learned about pine today: you CAN comma separate variable declarations on a single line and you can explicitly type arrays with array<>.
PineCoders
This publication is now featured in our Editors' Picks: tradingview.com/scripts/editors-picks/ .
In the name of all TradingViewers, thank you for your valuable contribution to the community, and congrats!
Maximalist1997
How to use this?
Aber-J
@Maximalist1997, I'd also welcome an explanation. In particular, I don't understand the boxes on the right.

What seems to me to be happening:
It looks back over 17 selected time horizons (ranging from 2-512 bars) to see whether there's a correlation between volume traded and the price movements. Each of these is plotted as a dot on a scale from -1 (low correlation) to +1 (high correlation). Green is used if price volatility was rising and purple if it was falling, and the recent dots are darker (a faint dot was calculated using a long historical period like 512 bars and a solid one just uses more recent bars). The max / average / min values (the 3 lines at the top / middle / bottom of the chart) are also shown.

So ... if you look at a vertical slice of the indicator, you will see 17 dots. If they're mostly at the top, then higher volumes mean more price volatility. If the faint ones are at the bottom but the dark ones are at the top, then recently there has been a correlation between price volatility and volume, but in the past this wasn't the case. The lines show the max / min / average changing over time.

On the right hand side, there are boxes with a summary of recent results (e.g. last 10 bars) showing how many of them were in each range (-1 to 0.9; -0.9 to -0.8; ...; +0.9 to +1.0). If there are no results then no box shows.

I think they should be then showing: how many dots were found in that range, and what percentage that is of the total dots found in the recent bars; with the width of the box representing that number but ... this shows for me as a strange purple colour, and I can't read the text.

It then also displays summed values, but I'm not clear on what it is summing up (the total correlation values perhaps?) with the width of the box also representing this, and what percentage they are. Also, it often shows strange values for me - might be an issue with it not updating correctly (e.g. if there's no data for a box doesn't delete the text that was there before perhaps)?

Intriguing concept behind the script and I'll look at it in more detail!
RedKTrader
some wonderful magic here :) - thank you for sharing.
Parimal_S
Price action decoded. thanks
עוד