Synergy StatsSynergy Stats
This indicator is intended to complement the Synergy indicator. It provides the following statistics:
A percentage showing how often the two assets move in the opposite direction over a given lookback period.
Similarly, another percentage showing how often the two assets move in the same direction over the same lookback period.
Count the number of times (occurrences) when the two assets move in the same direction for more than 4 bars.
Count the number of times the alternative asset moves more than x%
Count the number of times that chart asset moved in the same direction of the alternative asset when the alternative asset moved more than x%
Both indicators were developed for use in an investigation/tutorial using Pine Script to analyse Gold and US Dollar Index correlation.
The full free post can be found here: backtest-rookies.com
Correlation
SynergySynergy
This indicator was developed for use in an investigation/tutorial using Pine Script to analyse Gold and US Dollar Index correlation.
The first indicator shall measure the percentage change between the open and close of each bar and compare it to the same percentage change of an alternative asset. Additionally, we shall color the background when the two assets move in the same direction. This should allow us to more easily see when the two assets move together and spot trends in their moment.
The yellow bars show use the percentage change in the price of gold. The blue bars show the percentage change in the price of the US Dollar index. If the bar is above zero, it means that the asset closed up. Conversely, if it is below zero, it means the asset closed down. Finally, the grey bars show bars in which the two assets closed in the same direction.
It can be used in conjunction with a second indicator (to be published soon) that provides statistics generated from this indicator.
The full free post can be found here: backtest-rookies.com
Forex Pairs CorrelatorHi everyone!
This tool helps to identify the best positive and negative correlated pairs from 38 well-known Forex pairs.
By default it will find the best correlations for your current ticker.
If you are a newbie in Correlation Analysis you can find a brief explanation here .
Settings
Lookback for correlations (default: 14 )
Option to use or not to use current ticker (default: true )
Custom ticker (default: EURUSD )
Choose as many pairs as you want from 38 available pairs.
Available pairs
USDCAD
USDMXN
USDBRL
USDCHF
USDRUB
USDTRY
USDZAR
USDJPY
USDCNY
CADCHF
CADJPY
CHFJPY
EURUSD
EURCAD
EURGBP
EURCHF
EURRUB
EURTRY
EURJPY
EURCNY
EURAUD
EURNZD
GBPUSD
GBPCAD
GBPCHF
GBPRUB
GBPJPY
GBPCNY
GBPAUD
GBPNZD
AUDUSD
AUDCAD
AUDCHF
AUDJPY
AUDCNY
AUDNZD
NZDUSD
NZDJPY
How to get access
You can buy this tool for 49$ to get lifetime access
Cheers!
Crypto USD Pairs CorrelatorHey there!
This tool helps to identify the best positive and negative correlated pairs from 38 crypto */USD pairs.
By default it will find the best correlations for your current ticker.
If you are a newbie in Correlation Analysis you can find a brief explanation here .
Settings
Lookback for correlations (default: 14 )
Option to use or not to use current ticker (default: true )
Custom ticker (default: BTCUSD )
Choose as many pairs as you want from 38 available pairs.
Available pairs
ADAUSD
BATUSD
BCDUSD
BCHUSD
BCNUSD
BNBUSD
BTCUSD
BTGUSD
BTSUSD
DASHUSD
DCRUSD
DGBUSD
DOGEUSD
EOSUSD
ETCUSD
ETHUSD
ICXUSD
IOTAUSD
LSKUSD
LTCUSD
MKRUSD
NANOUSD
NEOUSD
OMGUSD
ONTUSD
PAXUSD
QTMUSD
TRXUSD
VETUSD
WAVESUSD
XEMUSD
XLMUSD
XMRUSD
XRPUSD
XTZUSD
ZECUSD
ZILUSD
ZRXUSD
How to get access
You can buy this tool for 49$ to get lifetime access
Good luck!
ETH Pairs CorrelatorHey there!
This tool helps to identify the best positive and negative correlated pairs from 38 */ETH cryptocurrency pairs.
By default it will find the best correlations for your current ticker.
If you are a newbie in Correlation Analysis you can find a brief explanation here .
Settings
Lookback for correlations (default: 14 )
Option to use or not to use current ticker (default: true )
Custom ticker (default: BTCUSDT )
Choose as many pairs as you want from 38 available pairs.
Available pairs
ADAETH
BATETH
BCDETH
BCHETH
BNBETH
BSVETH
BTGETH
DASHETH
DGBETH
EOSETH
ETCETH
HOTETH
ICXETH
IOTAETH
LSKETH
LTCETH
MKRETH
NANOETH
NEOETH
NPXSETH
OMGETH
ONTETH
QKCETH
QTMETH
REPETH
TRXETH
TUSDETH
VETETH
WAVESETH
XEMETH
XLMETH
XMRETH
XRPETH
XTZETH
XVGETH
ZECETH
ZILETH
ZRXETH
How to get access
You can buy this tool for 49$ to get lifetime access
Good luck!
BTC Pairs CorrelatorHey there!
This tool helps to identify the best positive and negative correlated pairs from 38 */BTC cryptocurrency pairs.
By default it will find the best correlations for your current ticker.
If you are a newbie in Correlation Analysis you can find a brief explanation here .
Settings
Lookback for correlations (default: 14 )
Option to use or not to use current ticker (default: true )
You can switch to a custom ticker (default: BTCUSDT )
Choose as many pairs as you want from 38 available pairs.
Available pairs
ADABTC
BATBTC
BCDBTC
BCHBTC
BCNBTC
BNBBTC
BSVBTC
BTGBTC
DASHBTC
DCRBTC
DGBBTC
DOGEBTC
EOSBTC
ETCBTC
ETHBTC
LSKBTC
LTCBTC
IOTABTC
MKRBTC
NANOBTC
NEOBTC
OMGBTC
ONTBTC
PAXBTC
QTMBTC
TRXBTC
TUSDBTC
USDCBTC
VETBTC
WAVESBTC
XEMBTC
XLMBTC
XMRBTC
XRPBTC
XTZBTC
ZECBTC
ZILBTC
ZRXBTC
How to get access
You can buy this tool for 49$ to get lifetime access
Good luck!
Stock Market Indices Correlations HeatmapHello traders!
This tool shows you the correlation between well-known stock market indices and selected instrument. Also it has customizable alerts for the strong positive and negative correlations.
What are correlation and correlation coefficient?
Correlation is a term from mathematical statistics that describes the strength of linear relationship between the variables (in our case: financial instruments).
Simply speaking, it describes whether or not instruments move in same/opposite directions.
Correlation coefficient is a statistical measure of the correlation and that is bounded in a range of -1 to 1. The most common calculation of the correlation coefficient is the Pearson product-moment method.
How to interpret?
The darker the color, the stronger the correlation
Green colors mean positive correlations
Red colors mean negative correlations
Transparent colors mean no correlation or absence of the symbol data
Supported indices
Russell 3000
Russell 2000
NASDAQ Composite
NYSE Composite
S&P 500
DJIA
SSE Composite
CSI 300
SZSE Composite
NIKKEI 225
HSI 50
DAX 30
FTSE 100
CAC 40
RTSI 50
S&P/TSX 500
S&P/ASX 200
BOVESPA 60
NIFTY 50
BSE 30
IBEX 35
FTSE MIB 40
SMI 20
ATX 20
OMXS 30
KOSPI 200
BIST 100
VN 30
I attach screenshots to show you how it works with other instruments.
How to get access
Buy for only 59$ to get lifetime access to this indicator
Like and follow for more cool indicators!
Good luck and happy trading!
Partial CorrelationComputes the partial correlation between 2 symbols while removing the influence of a third.
Ex.:
Computes the correlation between AAPL and AMZN while removing the influence of SPX.
Crypto Correlation Matrix Series [SHK]Hi everyone, Although everything's clear from the title but I should describe some basic points.
Currency Correlation is a statistical measure of how two securities move in relation to each other.
So this script is used to show if current pair (alt-coins) is moving in the same direction of bitcoin (or ethereum) or not. Consider that in crypto market most of alt-coins have correlation of +0.7 with bitcoin, So temporary changes in correlation may signal a reversal or sharp continuation for the alt-coin.
"1" : The alt coin is moving in same direction of Bitcoin (Or Ethereum).
"0" : The alt coin is moving in random direction compared to Bitcoin. (No movement relation)
"-1" : The alt coin is moving in opposite direction of Bitcoin.
Important Note: By default average of 15 bars back is measured to calculate the correlation by this script. Please test other periods and share the best options with us.
Comments are welcomed :)
Flunki Ticker CorrelationCan't take credit for this, I found it somewhere, no idea where...
It correlates 6 tickers... enjoy.
Forex Correlations HeatmapA utility tool to find linear relationships between major forex pairs and specified symbol.
Features
30 well known forex pairs (Pine Script has its limits and incomprehensible "study" errors)
Ability to specify any symbol to see correlations
Ability to specify a preferred timeframe
Ability to specify correlation lookback
Ability to specify different sources (standard prices, volumes, true range, double true range)
How to interpret
The darker the color, the stronger the correlation
Green colors mean positive correlations
Red colors mean negative correlations
Transparent colors mean no correlation or absence of the symbol data
How to get access
PM me for more details
Supported pairs
USDCAD
USDBRL
USDCHF
USDRUB
USDJPY
USDCNY
CADCHF
CADJPY
EURUSD
EURCAD
EURGBP
EURCHF
EURRUB
EURJPY
EURAUD
EURNZD
CHFJPY
GBPUSD
GBPCAD
GBPCHF
GBPJPY
GBPAUD
GBPNZD
AUDUSD
AUDCAD
AUDCHF
AUDJPY
AUDNZD
NZDUSD
NZDJPY
Other similar indicators of mine:
Crypto Correlations Heatmap
Forex Correlations
Crypto Correlations HeatmapA utility tool to find linear relationships between major cryptocurrency pairs and specified symbol.
Features
31 well known cryptocurrency pairs (Pine Script has its limits and incomprehensible "study" errors)
Ability to specify any symbol to see correlations
Ability to specify a preferred timeframe
Ability to specify correlation lookback
Ability to specify different sources (standard prices, volumes, true range, double true range)
How to interpret
The darker the color, the stronger the correlation
Green colors mean positive correlations
Red colors mean negative correlations
Transparent colors mean no correlation or absence of the symbol data
How to get access
PM me for more details
Supported pairs
BTCUSD
ADAUSD
BCHUSD
DASHUSD
EOSUSD
ETCUSD
ETHUSD
LTCUSD
NEOUSD
TRXUSD
USDTUSD
XEMUSD
XLMUSD
XMRUSD
XRPUSD
ZECUSD
ADABTC
BCHBTC
DASHBTC
EOSBTC
ETCBTC
ETHBTC
LTCBTC
NEOBTC
TRXBTC
USDTBTC
XEMBTC
XLMBTC
XMRBTC
XRPBTC
ZECBTC
Asset Correlation Tool v2Correlation amongst assets is the degree to which they move in tandem. This indicator measures correlation between different assets. Why is that important?
To any investor diversification is a very important technique for reducing risk. The problem is that most misunderstand it. Most people tend to think diversification is achieved simply by investing in a variety of assets instead of just a few.
This is wrong.
The whole point of diversification is to be invested in assets with different growth drivers. A portfolio consisting of +20 highly correlated assets (Your cryptobags, probably) is the OPPOSITE of diversification. This is taking on risk without being compensated for it. Which is contradictory to the fundamental reason for why you do invest in assets.
Proper diversification is achieved when you reduce the correlation between the assets in your portfolio.
HOW TO USE
To use this tool, add it to your favorites and then add it to your chart. It will by default only show the correlation between an altcoin index and the current chart symbol.
If you go to its settings you can add its correlation to the stock market, gold and you can also easily customize it to any security you want.
0.5 to 1.0: Strong positive correlation
Around 0: Little to no correlation
-0.5 to -1.0: Strong negative correlation
Took a few hours to build this one. It would be super helpful if you can take a look at the index I used - I'm convinced there are better and more accurate methods to this one. But best I could come up with
Later I will evolve this one to an oscillator that measures the relation between cross coin correlations and volatility. Inspired by some great work by @cryptorae
If you have any requests or ideas please shoot
Updates v0.2
- Added altcoin index
- Changed some calculations
- Restructed code
Asset Correlation ToolCorrelation amongst assets is the degree to which they move in tandem.
Diversification is a technique for reducing risk. Most people tend to think this is achieved simply by investing in a variety of assets instead of just a few. This is wrong.
Proper diversification is achieved when you reduce the correlation between the assets in your portfolio.
0.5 to 1.0: Strong positive correlation
Around 0: Little to no correlation
-0.5 to -1.0: Strong negative correlation
Took a few hours to build this one. Later I will add an index for crypto (large cap) and I'll play around with different ways of presenting the data.
If you have any requests or ideas please shoot
U.S. Stocks & Options CVI to Bitcoin Correlation [NeoButane]Conceptual indicator based on trying to find an inverse correlation between bitcoin and traditional markets due to bitcoin's usefulness as a hedge against economic downturns.
How to use this script: you look at it and see if there is a correlation or not between bitcoin/Ethereum price and either U.S. stock CVi, buy volume, sell volume, calls, puts, or the call/put ratio.
SeasonalityA multitool to find seasonal effects and components in your time series. Seasonality is one of most frequently used statistical patterns to improve the accuracy of demand forecasts.
To learn more about seasonality see:
en.wikipedia.org
www.investopedia.com
Features
Ability to see up to 16 period lines
33 metric types
Metrics customization
17 types of the price sources
31 types of the moving averages
Readable and optimized code
How to get access
Buy for 899$ (One-time payment, Source Code Transfer, Sole ownership)
Buy for 349$ (One-time payment, Full-time access, Multi ownership)
Make the symbolic monthly donations to support my open source work (Donate-per-use, Part-time access, Multi ownership)
Free 7-day trial access
Supported Metrics
Price
Average Price
Price Momentum
Price ROC
True Range (by J. Welles Wilder)
Average True Range (by J. Welles Wilder)
Double True Range (by Cynthia Kase)
Average Double True Range
Accumulation/Distribution (by Marc Chaikin)
Volume
Average Volume
Volume Momentum
Volume ROC
Net Volume
On Balance Volume (by Joe Granville)
Trade Value
Tick Volume
Tick Range
Max Tick Movement
Min Tick Movement
Correlation
ADX (by J. Welles Wilder)
Coppock Curve (by Edwin S. Coppock)
Elder Force Index (by Dr. Alexander Elder)
Ease Of Movement (by Richard W. Arms)
Mass Index (by Donald Dorsey)
Price Volume Trend
TRIX (by Jack K. Hutson)
Ulcer Index (by Peter Martin and Byron McCann)
VHF, Vertical Horizontal Filter (by Adam White)
Swing Index (by J. Welles Wilder)
Accumulative Swing Index (by J. Welles Wilder)
Standard Deviation
Supported Price Sources
open
high
low
close
oo2 ( (open + previous open) / 2 )
oh2 ( (open + high) / 2 )
ol2 ( (open + low) / 2 )
oc2 ( (open + close) / 2 )
hh2 ( (high + previous high) / 2 )
hl2
hc2 ( (high + close) / 2 )
ll2 ( (low + previous low) / 2 )
lc2 ( (low + close) / 2 )
cc2 ( (close + previous close) / 2 )
hlc3
ohlc4
wc (weighted close, (2 * close + high + low) / 4 )
Supported Moving Averages
AHMA, Ahrens MA (by Richard D. Ahrens)
ALF, Adaptive Laguerre Filter (by John F. Ehlers)
DEMA, Double Exponential MA (by Patrick G. Mulloy)
EMA, Exponential MA
EVWMA, Elastic Volume Weighted MA (by Christian P. Fries)
FRAMA, Fractal Adaptive MA (by John F. Ehlers)
HMA, Hull MA (by Alan Hull)
IIRF, Infinite Impulse Response Filter (by John F. Ehlers)
LSMA, Least Squares MA
LWMA, Linear Weighted MA
Median
RMA, Running MA (by J. Welles Wilder)
RMF, Recursive Median Filter (by John F. Ehlers)
RMTA, Recursive Moving Trend Average (by Dennis Meyers)
SMA, Simple MA
SHMMA, Sharp Modified MA (by Joe Sharp)
SMMA, Smoothed MA
TEMA, Triple Exponential MA (by Patrick G. Mulloy)
TMA, Triangular MA (Modified by John F. Ehlers)
VIDYA, Variable Index Dynamic Average (by Tushar S. Chande)
VWMA, Volume Weighted MA
WMA, Weighted MA
ZLEMA, Zero Lag Exponential MA (by John F. Ehlers and Ric Way)
2-Pole BF, 2-Pole Butterworth Filter (by John F. Ehlers)
3-Pole BF, 2-Pole Butterworth Filter (by John F. Ehlers)
2-Pole SSF, 2-Pole Super Smoother Filter (by John F. Ehlers)
3-Pole SSF, 2-Pole Super Smoother Filter (by John F. Ehlers)
1-Pole GF, 1-Pole Gaussian Filter (by John F. Ehlers)
2-Pole GF, 2-Pole Gaussian Filter (by John F. Ehlers)
3-Pole GF, 3-Pole Gaussian Filter (by John F. Ehlers)
4-Pole GF, 4-Pole Gaussian Filter (by John F. Ehlers)
Kendall Rank Correlation CoefficientKendall Rank Correlation Coefficient script.
This way to measure the ordinal association between two measured quantities described by Maurice Kendall (1938, Biometrika, 30 (1–2): 81–89, "A New Measure of Rank Correlation").
In this script I compare Kendall Coefficient and Pearson Coefficient (using built-in "correlation" function).
Multiple Majors Currency Basket Power Oscillatorthis script by RichardoSantos
description
--
Power oscillator to discern what currency's are stronger/weaker.
added option to use a smoothed source(close) for pooling the change, giving longer term directional bias, note that this causes lag in the results as MA's turn slower than price.
--
I added currency labels and changed line color only.
Forex CorrelationsA utility tool to find linear relationships between different currency pairs and
specified symbols. This is another private indicator of mine.
Features
37 well known Forex pairs
3 correlation display modes ( Positive and Negative , Positive , Negative )
Ability to specify any symbol to see correlations
Ability to specify a preferred timeframe
Readable and optimized code
How to get access
Buy for 1199$ (One-time payment, Source Code Transfer, Sole ownership)
Buy for 539$ (One-time payment, Full-time access, Multi ownership)
Make the symbolic monthly donations to support my open source work (Donate-per-use, Multi ownership)
Supported pairs
USDCAD
USDMXN
USDBRL
USDCHF
USDRUB
USDTRY
USDZAR
USDJPY
USDCNY
USDHKD
CADCHF
CADJPY
EURUSD
EURCAD
EURGBP
EURCHF
EURRUB
EURTRY
EURJPY
EURCNY
EURAUD
EURNZD
GBPUSD
GBPCAD
GBPJPY
GBPCNY
GBPAUD
GBPNZD
AUDUSD
AUDCAD
AUDCHF
AUDJPY
AUDCNY
AUDNZD
NZDUSD
NZDJPY
NZDCNY
Correlated Market Matrix - Correlation Computer - GyromaticalCorrelated Market Matrix - Correlation Computer
Works with up to 7 markets simultaneously to find price divergences.
Study Forex pairs, stocks, crypto alt coins.
Find potential entries quicker.
Short Description:
This indicator analyzes 6 markets and one spread (or 7 and no spread) against the currently loaded instrument,
with support for complex formulas. This indicator finds positive and negative correlations intrabar and throughout
the specified time frame simultaneously. It employs a weighting system and score threshold
(everything is user-definable) and signals upon positive or negative score. Alerts are included
for intrabar and overall positive and negative correlations.
Detailed description:
This indicator analyzes 6 different markets and 1 spread (or 7 different markets if no spread) and
measures correlations between them. The squares on the background are individual
correlations (intrabar) and the circles to the right-hand side depict whether the markets have risen
or fallen in price since the start of the specified time frame (red/green or gray for neutral).
To the right of the circles you have the instrument numbers. The numbers represent the instruments you
have specified, in order. Above these numbers and circles you will find two square icons.
You will notice the left-most icon has the caption of "Overall Score +" (or -) and the right-most icon
has the caption of "Intrabar Score +" (or -). The overall score measures the correlation score from the
start of the time frame to the present time. The intrabar icon measures the correlation score of
individual candles. The scoring system implements weighting which uses scores for each individual instrument
and all scores are user-definable (positive and negative). There is also a threshold level which is user-definable,
if the score reaches or crosses this level it will trigger the aforementioned signal icons.
The analyzation time frame is decided by the user. The Correlated Market Matrix can calculate from a
given date to present (real-time), or between two specified historic dates.
You are able to represent the correlations using the close (price) of the instrument or an EMA (speed is user-adjustable).
The spread has the individual option to use EMA or close (price) separately from the other instruments.
You have the option to assign the weight of any number (0 to 100) to any instrument if the instrument is bullish.
You additionally have the option of subtracting the numbers if it is bearish (-100 to 0).
You may assign both bullish and bearish weights to each instrument at the same time to obtain maximum balance.
If you do not desire custom weighting, simply leave the weights at 1.
The negative vs positive levels are then measured, and whichever score is the strongest determines if the
square icon displays "Overall Score +" or "Overall Score -" (same for Intrabar).
"Score +" means that the score is equal to or greater than the threshold.
"Score -" means that the score is less than the threshold.
Additionally you are provided the option of visualizing the actual correlation lines. This is useful in the sense that
you may view the direction of that particular secondary instrument without actually opening its chart. The color red
implies that the correlation is falling, while green implies it is rising. Please note that due to
limitations you cannot see the actual correlation value of these lines, and also this is an experimental feature so lines
may not always appear appropriately. In testing a line may vanish momentarily here and there but it is somewhat rare.
The background squares will tell you the actual state of the correlation.
HOW DO YOU READ IT?
The numbers represent the instrument you selected in that number slot.
The circles to the left of the numbers indicate if that market is up or down since the beginning of the specified timeframe.
Red means price is down, green means price is up, gray is neutral.
The icon "Intrabar Score +" or "Intrabar Score -" indicates whether the majority of markets are over their score threshold
(negative or positive correlation) for the current candle only.
If this is "Neutral" then there is no current score.
The icon "Overall Score +" or "Overall Score -" indicated the majority of markets are over their score threshold (negative or
positive correlation) for the OVERALL time frame (start to current, or start to finish if you are not using in real-time).
If this is "Neutral" then there is no current score.
For individual candle correlations, if the secondary instrument is up and the main instrument is down, the boxes are red.
If secondary instrument is down and main instrument is up, boxes are green.
If correlation lines are red then the correlation is becoming negative, if they're green then they're becoming positive.
This does not mean there is a negative or positive correlation, only that the correlation is rising or falling.
The background squares will tell you the state of the correlation.
PLEASE NOTE:
If you are using a white or bright colored chart, click the gear icon next to the indicator name.
Select the "Style" tab. The first option "Time frame Background Color" should be adjusted to either
black or white with no transparency (take note of the slider underneath the color squares).
This will make the matrix appear correctly.
INPUT MENU
By clicking the gear icon next to the indicator name, you are presented with a host of options.
The options are as follows, in order of appearance:
- Correlation Length : Amount of bars to look back for the correlation.
- Show Correlation Lines : Chose whether to display the correlation lines or not.
- Use Rising/Falling Colors : Use rising/falling colors for correlation lines instead of unique colors.
- Instrument Source : Chose from 'Price' or process the instrument through EMA instead.
- Price Source : This source works for both "Price" source and the EMA source.
- EMA Speed : Speed of the EMA if 'Instrument Source' is set to 'EMA'.
- Use EMA on Spread 1 : Use EMA on the 'Spread Instrument 1'. If unchecked, close is used by default.
- Use EMA on Spread 2 : Use EMA on the 'Spread Instrument 2'. If unchecked, close is used by default.
- EMA Speed for Spread 1 : Speed of EMA for Spread 1 if EMA is used instead of 'close'.
- EMA Speed for Spread 2 : Speed of EMA for Spread 2 if EMA is used instead of 'close'.
- Disable Spread and use Instrument 1 as correlated market instead : By default, the indicator takes both spread
instruments and calculates the spread between each (instrument1-instrument2=spread). If this feature is enabled, the indicator
will use only the 'Spread Instrument 1' and calculate it in the same manner as the other markets.
This is useful if you do not wish to use a spread and would rather have an extra market.
- Positive Weight of Instrument (1-7/spread) : Positive weight for the instrument.
It is recommended to enter only positive numbers here. If left 0, no weight will be added to the instrument but the indicator will
signal "Score -" if all others are also 0. If left at 1, if more markets are positive than negative, the indicator will present "Score +".
- Negative Weight of Instrument (1-7/spread) : This works in the same way as positive weight except it is recommended you enter
only negative numbers here (example: -1.5, -20). This number is subtracted from the overall score. If left 0, no weight will be
added to the instrument but the indicator will signal "Score -" if all others are also 0. If left at 1, if more markets are negative than positive,
the indicator will present "Score -".
- Threshold for score to be determined : if the weighting score of the instruments is this number or greater then
the square signal icon of + (greater) or - (lesser) is triggered.
- Instrument (1-6) : This is where you select which instruments/securities you wish to analyze. This input also
supports complex formulas, same as you'd enter them on your chart.
- Spread Instrument 1 : Instrument of part 1 of spread calculation
- Spread Instrument 2 : Instrument of part 2 of spread calculation
- From Month/Day/Year/Hour/Minute : Display data beginning at this specified time.
- To Month/Day/Year/Hour/Minute : Stop analyzing data at this specified time. To have it calculate indefinitely
in real-time, then the "To" settings should be left at Month: 12, Day: 31, Year: 2222, Hour: 23, Minute: 59.
STYLE MENU
- Time frame background color : The background color of the viewing area, especially helpful for white charts where colors may become faded.
- Correlation Line (1-7) : Properties for the displayed lines (if enabled). The first two colors are for rising and falling respectively
(if "Use rising/falling colors" is enabled), the last color is the default color of the line. This last color
will also be used for neutral if "rising/falling" is enabled.
- Instrument Label (1-7,Spread) : Properties for the right-hand numbered column, denoting which line is which instrument.
- Separator (1-8) : Solid lines between instruments
- Price Circle (1-7) : Circles between labels and background colors, denoting price rise/fall.
- Score + or - : Score icon above the instrument numbers
- Fill Row (1-6, Spread) : Background colors for the matrix. Default is red and green.
Have an idea? Customized logic is available for this framework.
This is not financial advice and this indicator system does not guarantee or claim to make profit.
The signals and ideas contained within this page and indicator are provided on an as-is basis. Use at your own risk.
SpreadTrade - CorrelationCorrelation 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 which means one instrument going up and another going down.
Here, instead of two different instruments two timeframes of the same instrument are used, lower and higher.
In order to calculate the trade size, we would need to calculate hedge_ratio,
which is simply the ratio of the closing price of the instrument in the current tf to the higher tf.
So whenever we want to go short on spread we’ll short 1 unit of current tf and go long on hedge ratio times units of higher tf.
In order to generate trading signals, we need to define our trading logic.
So, we’ll go long on the spread when the hedge ratio goes below its p rolling mean by mult times of its
rolling standard deviation and vice versa.
Note that both p and mult can be changed as per your selection of instruments.
See: analyticsprofile.com
NOTE:
There is a minor problem to it in Pinescript. After a while the signal line goes horizontal and the two bounds, upper and lower, converge unless you update the time frame.
Kepp me in the know if you find a solution to this problem)