Pearson's R Convergence DivergenceThis script calculates the convergence divergence and breakouts from the deviations for a fast and slow linear regression slope.
This can be used to predict major market moves before they happen.
For users familiar with MacD, the blue line is similar to the MacD line and the orange line the signal.
The difference is this is not a moving average comparison but a comparison between Pearson's R values.
-0.1 (positive direction)
0.1 (negative direction)
This is why the colors look inverse for a typical MacD.
How to use this:
The idea is that when both trends converge in the 0.8 or -0.8 range and you see a breakout cross occur on either line then the price has a high likelihood of reversing its current trend.
If you see a green cross it means the top of the linear regression for the 'fast' or 'slow' linear regression deviation was broken by the current price. This can signify that upward movement is coming soon.
On the flip side a red cross means the bottom of the linear regression for the 'fast' or 'slow' linear regression deviation was broken by the current price. This can signify that downward movement is coming soon.
These crosses mean a lot more if the pearson's R value is already maxed out near 0.8 or -0.8.
This indicator works because the more sure a trend becomes the more likely it is to break as more traders see the pattern.
The histogram colors do not mean much being 'red' or 'green', what you want to look for is when the histogram starts to approach the 0 mark. This signifies that both linear regression trends are about to reach their peak before reversing trend. So don't confuse this with how you might read the MacD even though it looks very similar. The histogram sloping towards the 0 line will give you a clue how long it might take before the reversal occurs .
Please PM me if you have any questions, and enjoy!
Pearsonsr
Crypto Correlation MatrixA crypto correlation matrix or table is a tool that displays the correlation between different cryptocurrencies and other financial assets. The matrix provides an overview of the degree to which various cryptocurrencies move in tandem or independently of each other. Each cell represents the correlation between the row and column assets respectively.
The correlation matrix can be useful for traders and investors in several ways:
First, it allows them to identify trends and patterns in the behavior of different cryptocurrencies. By looking at the correlations between different assets, traders can gain insight into the intra-relationships of the crypto market and make more informed trading decisions. For example, if two cryptocurrencies have a high positive correlation, meaning that they tend to move in the same direction, a trader may want to diversify their portfolio by choosing to invest in only one of the two assets.
Additionally, the correlation matrix can help traders and investors to manage risk. By analyzing the correlations between different assets, traders can identify opportunities to hedge their positions or limit their exposure to particular risks. For example, if a trader holds a portfolio of cryptocurrencies that are highly correlated with each other, they may be at greater risk of losses if the market moves against them. By diversifying their portfolio with assets that are less correlated with each other, they can reduce their overall risk.
Some of the unique properties for this specific script are the correlation strength levels in conjunction with the color gradient of cells, intended for clearer readability.
Features:
Supports up to 64 different crypto assets.
Dark/Light mode.
Correlation strength levels and cell coloring.
Adjustable positioning on the chart.
Alerts at the close of a bar. (Daily timeframe or higher recommended)
Dual Purpose Pine Based CorrelationThis is my "Pine-based" correlation() function written in raw Pine Script. Other names applied to it are "Pearson Correlation", "Pearson's r", and one I can never remember being "Pearson Product-Moment Correlation Coefficient(PPMCC)". There is two basic ways to utilize this script. One is checking correlation with another asset such as the S&P 500 (provided as a default). The second is using it as a handy independent indicator correlated to time using Pine's bar_index variable. Also, this is in fact two separate correlation indicators with independent period adjustments, so I guess you could say this indicator has a dual purpose split personality. My intention was to take standard old correlation and apply a novel approach to it, and see what happens. Either way you use it, I hope you may find it most helpful enough to add to your daily TV tool belt.
You will notice I used the Pine built-in correlation() in combination with my custom function, so it shows they are precisely equal, even when the first two correlation() parameters are reversed on purpose or by accident. Additionally, there's an interesting technique to provide a visually appealing line with two overlapping plot()s combined together. I'm sure many members may find that plotting tactic useful when a bird's nest of plotting is occurring on the overlay pane in some scenarios. One more thing about correlation is it's always confined to +/-1.0 irregardless of time intervals or the asset(s) it is applied to, making it a unique oscillator.
As always, I have included advanced Pine programming techniques that conform to proper "Pine Etiquette". For those of you who are newcomers to Pine Script, this code release may also help you comprehend the "Power of Pine" by employing advanced programming techniques in Pine exhibiting code utilization in a most effective manner. One of the many tricks I applied here was providing floating point number safeties for _correlation(). While it cannot effectively use a floating point number, it won't error out in the event this should occur especially when applying "dominant cycle periods" to it, IF you might attempt this.
NOTICE: You may have observed there is a sqrt() custom function and you may be thinking... "Did he just sick and twistedly overwrite the Pine built-in sqrt() function?" The answer is... YES, I am and yes I did! One thing I noticed, is that it does provide slightly higher accuracy precision decimal places compared to the Pine built-in sqrt(). Be forewarned, "MY" sqrt() is technically speaking slower than snail snot compared to the native Pine sqrt(), so I wouldn't advise actually using it religiously in other scripts as a daily habit. It is seemingly doing quite well in combination with these simple calculations without being "sluggish". Lastly, of course you may always just delete the custom sqrt() function, via Pine Editor, and then the script will still operate flawlessly, yet more efficiently.
Features List Includes:
Dark Background - Easily disabled in indicator Settings->Style for "Light" charts or with Pine commenting
AND much, much more... You have the source!
The comments section below is solely just for commenting and other remarks, ideas, compliments, etc... regarding only this indicator, not others. When available time provides itself, I will consider your inquiries, thoughts, and concepts presented below in the comments section, should you have any questions or comments regarding this indicator. When my indicators achieve more prevalent use by TV members, I may implement more ideas when they present themselves as worthy additions. As always, "Like" it if you simply just like it with a proper thumbs up, and also return to my scripts list occasionally for additional postings. Have a profitable future everyone!