DGT interpreted version of LazyBear's WaveTrend, visualizing on Price Chart
Original Author : LazyBear
Crosses above or below threshold are emphasized with bigger labels
- crosses above threshold : probable short indications with a bigger label and relativly small label for probable long indications
- crosses below threshold : probable long indications with a...
This script implements a rebrushed distance-based pair trading strategy. In this strategy, normally they trade the difference between the prices of two instruments. This difference is also called spread. Here, however we’ll trade the difference between two time frames of one instrument. And that's the main trick. Common procedure consists of the following...
In financial terms, 'correlation' is the numerical measure of the relationship between two variables (in this case, the variables are Forex pairs).
The range of the correlation coefficient is between -1 and +1. A correlation of +1 indicates that two currency pairs will flow in the same direction.
A correlation of -1 indicates that two currency pairs will move in...
Pinescript requires many of its built-in functions to use a simple int as their period length, which entails the period length cannot vary during the script's execution. These functions allow using a series int or series float for their period length, which means it can vary on each bar.
The functions shared in this script include:
Rolling sum: ...
Correlation Based Pair Trading Strategy (Trading the spread)
There are three popular styles of Pair trading:
* Distance based pair trading
* Correlation based pair trading
* Cointegration based pair trading
The correlation based strategy is to short the outperforming instrument and go long on the underperforming one
whenever the temporary correlation weakens...
The combination of RSI and CCI can be a powerful tool to efficiently signal the strength of the trend and upcoming reversals.
The magic comes when you're able to correlate both indicators correctly, this is the power I give you with the RSCCIO.
I've added additional features to each indicator that make signals more clear and easier to identify.
On the RSI
Indicator tracks the 10 day correlation with VIX. I prefer to use this with SPY. Can be a great way to flag tops/melt-ups.
Default settings are set to when the correlation is above 0.2, bars turn red, but you can change this.
Portfolio Risk Metrics (Part I):
The beta coefficient can be interpreted as follows:
β =1 exactly as volatile as the market
β >1 more volatile than the market
β <1>0 less volatile than the market
β =0 uncorrelated to the market
β <0 negatively correlated to the market
excerpt from the Corporate Finance Institute
correlation coefficient 'ρxy'...
I'm pleased to introduce this script in honor of the new array functions introduced to PineScript version 4.0. This update is a long time coming and opens the door to amazing scripting possibilities!
Named after Charles Spearman and denoted by the Greek letter ‘ ρ ’ (rho), the Spearman rank correlation coefficient is the nonparametric version of...
You don't need loops to get the rolling correlation between an input series and a linear sequence of values, this can be obtained from the normalized difference between a WMA and an SMA of the input series.
The closed-form solutions for the moving average and standard deviation of a linear sequence can be easily calculated, while the same rolling statistics for...
Ehlers Correlation Trend Indicator CTI by Cryptorhythms
In his article “Correlation As A Trend Indicator” in issue May 2020 of TASC, author John Ehlers introduces a new trend indicator that is based on the correlation between a security’s price history and the ideal trend: a straight line. He describes methods for using the indicator to not only...
This script was written to create a new, rapid relative strength index inspired by the Dow Theory.
More info about Dow Theory : www.investopedia.com
According to the Dow Theory, volume should confirm market trends.
The correlation coefficient between prices and volume is negative in weakening trends and negative trends , positive in...
Alpha Performance of Period (PoP) produces a visualization of returns (gains and losses) over a quarterly, monthly, or annual period. It also displays the total % gain and loss over any length of days, months, and years as defined by the user.
Performance of Period (PoP) can be used to understand the performance of an asset over multiple periods using a single...
This script allows you to compare the percentage-based change in the price of any two securities on any given (and supported) timeframe on the chart. This can give you a very simple way to compare any two securities against one another.
Ex: If your base security gained 5%, and the other security gained 3% in a single day, the change comparison would show a green...
Graph shows level of correlation between current source and another one and track current value of it. User can select source for comparison, graph period and number of candles for calculation, enter level of significal correlation (+-0.65 by default). Grapf contains 4 plots: Correlation - current level of correlation, Zero line , +Corr_level - minimum level of...
This script is very much beta!
This is a simple script to visualize how two symbols move in relation to each other. For example if the underlying symbol is a 2x Gold ETF (meaning the ticker moves at 2x the spot price of gold---if gold goes up 3% this ticker should go up 6%) and the comparison symbol is an 2x inverse gold ETF (at gold up 3% this should move down...
Display the correlation coefficient and/or Beta of an asset to a specified market.
- Specify market (S&P500 futures by default)
- Display one or other metrics
- Modify assessment period (200 bars by default)
- Calculate on price, returns or log-returns