Convergence/divergence indicatorConvergence/divergence indicator (CDI)
Class : arbitrage oscillator
Trading type : intraday trading
Time frame : 1 hour
Purpose : trading on divergence
Level of aggressiveness : standard
Arbitrage - several logically related transactions aimed at profit from the difference in prices for the same or related assets at the same time in different markets.
Pair trading is a trading strategy based on trading a pair of financial instruments that have some fundamental or statistical relationship, expressed in the fact that the price ratio of these instruments tends to return to a certain average value in the long term.
“Convergence/divergence indicator (CDI)” using correlation analysis from different time frames provides information about statistical relationship between pair of assets.
Correaltion - a statistical relationship between two variables, showing that a larger value (in the case of positive, direct correlation) or a smaller (in the case of negative, inverse correlation) corresponds to a larger value of one value in a certain part of the cases.
The correlation coefficient is a statistical measure of the strength of the relationship between the relative movements of two variables.
The values range between -1.0 and 1.0.
A correlation of -1.0 shows a perfect negative correlation, while a correlation of 1.0 shows a perfect positive correlation.
A correlation of 0.0 shows no linear relationship between the movement of the two variables.
“Convergence/divergence indicator (CDI)” a) allows to find assets where pair arbitrage is possible and determines the moments in time and prices when the conditions for pair arbitrage are ideal.
“Convergence/divergence indicator (CDI)” evaluates the statistical relationship between pair of assets in a particular period of time and, if it is available, seeks for the divergence in price fluctuations of these “identical” assets.
“Convergence/divergence indicator (CDI)” displays the current value and dynamics of the Pearson correlation coefficient for a pair of selected assets based on daily (thick blue line) and hourly (thin red line) data.
Basic parameters:
- asset 1 (name of the trading instrument 1);
- asset 2 (name of the trading instrument 2);
- period_d (number of periods used to calculate daily correlation).
- period_h (number of periods used to calculate hourly correlation).
To gain the access to this indicator, please, send a private message to Trade24Fx.
Расхождение
LuxAlgo® - Oscillator Matrix™Oscillator Matrix™ is an all-in-one indicator that incorporates 6+ unique components designed for interoperability & confluence with one another to provide a powerful trend following & reversal detection experience.
Users can create various ways to utilize the indicator's features together such as looking for excess money flowing into the market alongside strong reversal signals appearing or getting real-time divergence signals alongside a lack of money flowing into the market to predict upcoming trends.
This indicator is described as an 'Oscillator Matrix' as it's made up of many different components that can create a systematic approach to analyzing markets alone, however, the indicator also can serve as a great secondary piece to a user's primary analysis with or without our other LuxAlgo Premium indicators.
🔶 FEATURES
Below we describe each component of Oscillator Matrix™ in order of each's significance for the most confluent analysis possible.
Money Flow - Easily see the amount of buying or selling liquidity entering the market by analyzing the green & red waves and how they react with their thresholds to achieve further insight. Best to analyze first before considering any signals the indicator can generate.
Thresholds - Dynamic levels that align above/below the Money Flow to show at which level significant buying or selling is actually taking place.
Overflow - Small lighter waves that occur within the Money Flow's display when excess buying or selling activity is occurring to accurately predict upcoming reversals.
Hyper Wave - An oscillator ribbon in green/grey that provides highly reactive trend following signals & powerful divergence detection.
Real-Time Divergences - Real-time divergence labels that appear on the Hyper Wave oscillator's adaptive ribbon. A highly effective approach to a concept that's not typically done for oscillators. Users can also increase the sensitivity of divergences within the settings.
Reversal Signals - Small dots on the upper or lower boundaries represent high frequency points that indicate possible reversals or a warning signal to upcoming larger reversal signals which are indicated separately by the large triangular arrows on the top & bottom of the indicator's panel.
Confluence Zones - Allows the Money Flow & Hyper Wave oscillator to be used together to display easily interpretable shades of bullish & bearish activity. Brighter, more vibrant colors indicate strong bullish or bearish confluence between these 2 features.
Confluence Meter - An optional display at the current bar to easily find the current level of confluence between all features within Oscillator Matrix™ indicated by the arrow pointing to bullish or bearish levels. (Disabled by default)
Generally, we recommend using these features in order from first to last, whereas analyzing components of the Smart Money Flow category prior to considering other features in your analysis is most productive to ensure you find proper confluence alongside any signal that is generated.
🔶 USAGE
In the image below, we can see 5 points of interest to a user analyzing Oscillator Matrix™ based on various different behaviors.
Point 1 : Here we can see a large reversal signal arrow at the bottom of the panel. These signals, like all signals in LuxAlgo Premium & any indicator in general are not meant to be used as buy/sell signals themselves.
What makes this signal particularly more of interest opposed to other reversal signals that may not play out right away is the Money Flow that corresponding as weak. We can tell the Money Flow is weak because it is not near the red threshold level.
This indicates to us that there is not real selling pressure occurring and that the market could easily reverse in these conditions.
Point 2 : In this specific area we can notice the Money Flow in green is moving upwards alongside the green threshold level. This combination indicates a high probability there is a lot of real buying volume coming into the market, opposed to the previous example (point 1) where the Money Flow was not near the threshold level.
We can also notice the Hyper Wave Oscillator is printing a green dot while above the 50 value on Oscillator Matrix™ panel, further indicating a likely bullish impulse to come.
Point 3 : There are multiple indications here showing us the market may potentially be reversing. The most notable being the larger red reversal arrow, however, as we mentioned previously these cannot be used by themselves.
A further indication is that on the Money Flow we can see Overflow has occurred by the lighter small wave that has appeared & is now turning downwards. This indicates that an excess of buyers have come into the market & are likely to be washed out with a move to the downside.
We can see this happen once again about 8 candles later paired with a high frequency reversal signal (red dot) which marked a local high before the larger impulse down.
Point 4 : You can notice during the recent 25 or so candles the high frequency reversal points (green & red dots) have been highly effective for indicating potential local highs & lows in real-time.
There was a previous real-time bullish divergence detected while Money Flow was strongly in the red and this did indicate a small move upwards, however, with the Money Flow still holding in the red, another high frequency reversal dot, and then as the Money Flow begins to decrease further, we see a clean local top detected here at point 4.
Point 5 : As the lower Confluence Zone moved into the bright red, we saw a large move to the downside and a large bullish reversal signal printed in real-time as well.
Just like point 1, we have a very clear indication the selling has stopped as we further analyze the Money Flow is nowhere near it's true Activity Line.
This analysis combined gave us a further indication of a larger reversal which played out with no lag at all as all reversal signals are fully predictive separate from the Hyper Wave oscillator itself, which can be used as a further trend following approach alongside signals & money flow.
🔶 NAVIGATING MARKET CONDITIONS
In the image above we can see another example with 6 new points of interest marked in green & red shaded areas, all accompanied by a list of possible interpretations of the indicator.
The importance of this usage example is to demonstrate the ability to focus on certain components of the indicator during specific market conditions. For any indicator attempting to catch reversals, trending market conditions will be a detriment to its usability.
The same amount of the components within Oscillator Matrix™ will support trending market conditions as there are components to support ranging market conditions. The indicator further aims to provide clear abilities to detect when the market is likely trending or ranging.
With an understanding of the components within the Smart Money Flow section particularly such as the Overflow & Thresholds, it's possible to develop a more significant understanding of when to consider the market is trending vs when to consider the market may be ranging.
By doing this, we can potentially determine at certain points when to 'filter out' reversal signals or to just consider them merely indications of local tops/bottoms opposed to significant tops/bottoms.
Analyzing a significant Overflow particularly is useful to consider a trend potentially coming to an end. For example, at point 5 in the image above we had a clear downtrend only until there was a very considerable amount of Overflow that begun a real reversal.
We recommend studying the outlined chart above & the list of indications at each shaded area to develop a deep understanding of how to navigate varying market conditions & spot various points of confluence during reversals.
🔶 CONCLUSION & ACCESS
This indicator is an extremely comprehensive approach to an oscillator that allows users to further develop a systematic approach to trading and can be paired great alongside other forms of technical analysis such as our LuxAlgo Signals & Overlays indicator.
Although we believe this indicator to be useful, it's critical to understand that past performance is not necessarily indicative of future results and there are many more factors that go into being a profitable trader.
You can see the Author's instructions below to get instant access to Oscillator Matrix™ & our LuxAlgo Premium suite.
Mawreez' RSI Divergence DetectorThe idea behind this indicator is to have an expression for the amount of divergence on a given chart at every point in time . To achieve this, it adds up the magnitudes any valid divergence of any kind; bullish, bearish or their hidden variants. Where a valid divergence consists of a line on the source series (almost always the closing price), and a line on an oscillator (here: the RSI). The slopes of said lines must have opposite signs, that is to say, one line must be sloping up while the other slopes down. Said lines may not cross their respective series.
The length of the RSI is configurable (default length: 14). The lengths of the divergences are configurable (default: minimum length 3 and maximum length 28 - the latter being twice the default length of the RSI).
This indicator will detect divergences which are still building up. Be duly warned: upcoming divergences may still get invalidated. Another case that one should be very mindful of is that an upcoming divergence may still increase in magnitude before it plays out. Possibly over several more timesteps, there may even be entire additional drives.
The value of this indicator indeed reflects the magnitude of divergence on a chart. However, there is no reason to think the magnitude of a divergence affects the likelihood of said divergence playing out.
The color of the indicator indicates the kind of divergence. The default colors are
green for bullish divergence,
maroon (dark red) for bearish divergence,
lime/light green for hidden bullish divergence,
dark pink for hidden bearish divergence.
Please let me know if you would like to see a version of this indicator that plots both the RSI and this histogram. I will do this for personal use, but I am being a bit of a purist with this publication.
In fact, please don't hesitate to make any comment or to give any kind of suggestion.
SPX-VIX Intraday DivergenceAs a long-term buyer/short-seller, you will always find different ways to enter the market , moving average crossovers, breakouts , overbought/oversold conditions being some of the classy methods. However, they are decreasingly effective... 😢
Recently I have realized that analysis beyond the technical indicators will bring trading to the next level because I will be able to confirm my trading signals without relying too much on basic price actions and patterns which are easily manipulated by big banks and institutions. 👍
Today I will introduce you to my divergence indicator making use of SPX and VIX. Unlike MacD or RSI divegence , which would involve normative judgement , it will take account of the unusual move by SPX alongwith the VIX , to the exploit chances that options market, where most experienced investors participated in has a preceding insight into the equity market about the upcoming moves.
I have divided signals into two groups.
Bullish divergence - SPX Down , VIX also Down 👇
Bearish divergence - SPX Up , VIX also Up 👆
I hope this script will enable us to take advantage of the options market activities , to provide a REAL divergence signal, and be used coupled with our own chart patterns or other price signals, and more importantly to score more and more winning trades!!!
If you want more useful scripts from me, please like and share my posts. And don't forget to follow my account to grab the latest ideas and tools! 😘
BKN DivergencesThis divergence script is unique in that it is not linked to any one indicator. When you first add the indicator to your chart you'll notice that no plots show up.
First, add an indicator, moving average, volume, or other tool to your chart.
Open the Divergence indicator settings and select the source you want to use to detect divergences. Your options for this selection are pretty limitless. Just about any tool that can be added to your chart can be selected as the source for detecting divergences.
You'll be able to set alerts for hidden or regular divergences, both bearish and bullish in nature.
***IMPORTANT***
Please don't comment below to request access to this indicator. All access requests should be sent via direct message here or on my linked Twitter account.
MACD with divergence signalsIts an MACD indicator which highlights places where macd and signal line cross and hidden divergence ocures.
Logic behind it is to check if we have hidden divergence when crossing of that two lines and if above EMA200 (signal for BUY - green) or if below EMA200 (signal for SELL - red).
You can change lenght of EMA but i think 200 is a simpliest trend indicator.
Negative Volume Disparity IndicatorThe Negative Volume Disparity Indicator was created by Phillip C. Holt (Stocks & Commodities V. 14:6 (265-269)). This converts the classic Negative Volume indicator into Bollinger Bands and calculates the percentage of where the value lies within the Bollinger Bands. Buy when the nvdi rises above its signal line and sell when it falls below the signal line.
The OBVDI was a special request so I figured I would add this one as well. Let me know what other indicators you would like me to write scripts for!
[Zekis]RSI Linear RegressionA very useful combination between RSI and linear regression that shows a clear trend.
It is not recommended to be used for entry/exit points as it is.
It's very powerful for trend analysis and divergences.
Linear regression is a tool for statistical analysis that attempts to show a relationship between two variables. Linear regression looks at various data points and plots a trend line. Linear regression can create a predictive model showing trends of data.
Can be used with any time frame, mtf is also added
Alerts are added for RSI crossing the channel lines
RSI Divergence Indicator strategyThis strategy is based on RSI divergence indicator.
RSI period setting 5
Go Long when Bull or Hidden Bull is shown
Exit when RSI goes above 75 OR when bear condition appears
Divergence FinderHello Fellow Traders!
Divergence Finder is a custom script built upon request from a PRO user to help find Divergences & Hidden Divergences using OBVM & Fractal Levels of Support and Resistance along with visuals and alerts. This script also only looks at the divergences that happen with the greater macro trend, meaning price is trending above the 200 EMA of the current period.
Features
----------------------
Custom Alerts are built into the script for manual or automatic trading.
Multiple MA's to show overall trend and EMA supports for manual traders
Custom icons to indicate BULL, BEAR, HIDDEN BEAR, HIDDEN BULL --> the ghost emoji means hidden
Alerts Added for every point
Visual Entry & Exit Points for each level
Visual Trend Bands
You can get access to any of my scripts by visiting my website below , all links are down below in my signature!
Divergence Histogram for Many IndicatorHello Traders,
This script analyses divergences for 11 predefined indicators and then draws column on the graph. Red columns for negatif divergence (means prices may go down or trend reversal), Lime columns for positive divergences (means prices may go up or trend reversal)
The script uses Pivot Points and on each bar it checks divergence between last Pivot Point and current High/Low and if it finds any divergence then immediately draws column. There is no Latency/Lag.
There are predefined 11 indicators in the script, which are RSI , MACD , MACD Histogram, Stochastic , CCI , Momentum, OBV, Diosc, VWMACD, CMF and MFI.
Smaller Pivot Point Period check smaller areas and if you use smaller numbers it would be more sensitive and may give alerts very often. So you should set it accordingly.
There is "Check Cut-Through in indicators" option, I recomment you to enable it. it checks that there is cut-through in indicators or not, if no cut-through then it's shown as valid divergence.
You should see following one as well if you haven't yet:
Enjoy!
™TʀᴀᴅᴇCʜᴀʀᴛɪsᴛ Tʀᴇɴᴅsᴇᴛᴛᴇʀ™TradeChartist Trendsetter is an elegantly designed functional indicator that helps spot price trends based on user input and volatility to generate high probability BUY and SELL signals.
1. What does ™TradeChartist Trendsetter do?
Plots high probability BUY/SELL signals based on user input and price volatility.
Plots recommended Stop Loss and SOS signals.
Plots regular RSI divergences based on user input.
Plots Linear Regression trend lines based on user input.
Displays Trendsetter Dashboard with useful trade information.
Displays real time gains tracker.
Tracks another symbol on Dashboard based on user input.
Alerts when BUY and SELL signals are generated.
2. What markets can this indicator be used on?
Forex
Stocks - Signal prices calculated taking gaps into account.
Commodities
Cryptocurrencies
and almost any asset on Trading View.
Works really well when there is good volume, volatility or both in the asset traded/observed.
3. Do the indicator signals repaint?
No. Once the BUY and SELL signals are generated with entry price (open price of signal candle), there is no repainting.
This can be verified using Trading View Bar Replay to check if the signals stay in the same candle in real-time as the Bar Replay.
4. Does the indicator send alerts when a signal is generated?
Yes. Traders can get alerts by setting up Trading View alerts for BUY/SELL signals. For confirmed BUY/SELL alerts, 'Once Per Bar' must be used as there is no need to wait for the candle close.
Example Charts
GBP-USD 1hr chart with indicator plots description
GOLD 4hr chart using Daily HTF resolution from indicator settings.
SPX 15m chart using Daily HTF resolution with RSI divergences.
Note: Default settings work really well for most assets and time frames. Change HTF resolution (default 4hr) from indicator settings and make sure it is higher time frame than the chart resolution.
OBV with DivergenceAll I did was combine the logic from LazyBear for his OBV Oscillator to regular RSI divergence logic (where I replaced the RSI input to use LazyBear's OBV).
I didn't use any original code! Neither OBV (written by LazyBear) nor DIvergence (author unknown) was written by me. I merely modified the sytax a little to combine them.
Very useful for spotting divergences with OBV oscillator.
Takashi Divergence (RSI) | 2nd Gen | [Alerts]Easily highlight positive or negative divergence between price movement and RSI with Takashi-powered Divergence analysis.
Divergence strategy signals a potential reversal point because directional momentum does not confirm price. A bullish divergence occurs when the underlying market makes a lower low and RSI forms a higher low: RSI does not confirm the lower low and this shows strengthening momentum. A bearish divergence forms when the market records a higher high and RSI forms a lower high: RSI does not confirm the new high and this shows weakening momentum.
Inputs
Divergence Sensitivity
Float input. Sets a threshold after when the RSI divergence is triggered.
RSI Length
Integer input. The default setting used by most traders for the RSI is 14. That means that the indicator will go back 14 periods or time frames based on the chart being used (14 days on a Daily chart , 14 hours on an hourly chart and so forth) and make its calculation based on that.
Cross Distance
Integer input. Value from RSI that above or below 50 that classifies bullish or bearish levels. By default 15, that means the script will be checking for positive divergence when RSI is below 35 (50-15) and negative divergence when RSI is above 75 (50+15).
Use High & Low
Bool input. If true uses high and low values as RSI source.
To get access to this and other scripts check links below.
Accelerator Oscillator DivergencesDiscover divergences found by the Accelerator Oscillator indicator.
ScalpyScalpy is made up of a 2 main parts.
- The cloud comprising of a 10 period SMA and a 30 period SMA.
- When the cloud is green you should be looking for long entries.
- When the cloud is red you should be looking for short entries.
- Price is most bullish above a green cloud and most bearish below a red cloud.
- Being within the cloud indicates indecision.
The blue and white lines on the indicator show the relationship between price and momentum.
They can be used to spot reversals in two ways:
- The first is a divergence between price (blue line) and RSI (white line)
- If the price makes a lower low but the RSI makes a higher low this shows the trend is weakening and may be reversing soon (as can be seen by the two yellow lines on the chart).
The second is a simple crossover:
- When the white line crosses the blue line to the upside this signals a long entry.
- When the white line crosses the blue line to the downside this signals a short entry.
Function Highest/Lowest by PeterONo matter how much I like PineScript, there are still things missing in the language. One of the most annoying issues is that you cannot set dynamic length value for highest/lowest functions. This length must be fixed integer. But it doesn't make sense in a lot of cases, when you'd like to know what was the highest/lowest value of a series SINCE EVENT in the past, but you don't know WHEN this event exactly happened.
Us, coders would like to do this: `highest(series,barssince(...))`
But it is not working.
Numerous coders are using RicardoSantos' f_highest/f_lowest script (), probably the most often copy/pasted snippet of PineScript code out there. It is doing more-less what `highest(series,barssince(...))` would be doing, but with hardcoded max bars back.
Ricardo is my idol by the way, but that didn't stop me from creating my own version of Highest/Lowest functions. They are fast, simple, effective and very light for Pine engine.
Please treat this as an OPEN SOURCE snippet of code, which can be used in variety of ways.
I have implemented a simple use-case myself, to demonstrate what can be done. The example shows what was the highest/lowest value of RSI since the previous cross of Stochastic. So that you don't enter SHORT on Stochastic crossunder, if RSI didn't reach oversold (<30) since the previous Stochastic crossunder = aka maybe the downtrend has exhausted.
I'm sure you'll find plenty of use cases for it in your studies and strategies as well. If you create your own code using my Highest/Lowest functions, don't hesitate to put a link down here in comments.
P.S. This is not a strategy in any way, so don't ask me "does it backtest well?".
P.S.2 This code doesn't repaint as well ;)
Trend FollowerHello Traders!
While analysing the charts, one of the biggest problem is to see if there is trend or not, or is it in a congestion zone/area? While thinking about it, I found the idea to analyse moving averages in channel and their momentum according to channel width.
How it calculates and works?
On each bar it creates a channel by highest/lowest point of a MA. highest point is upper point and lowest point is lower point of the MA channel,
It gets highest and lowest point of last 300 bars, (say Price Channel )
If the width of MA channel is greater than certain rate of price channel then it decides there is trend
After it decided there is trend, it calculates the rate between channel and MA. Bigger result means stronger trend.
According to rate of MA channel and the price channel , bar color becomes lighter/darker. so when you look at the bar color you can see the trend strength.
Short explanation on the chart:
Also by changing channel or size other options (such MA length etc) you can see congestion zones/areas:
Another one, about trend direction and its strength:
Options:
You can choose following MA types as source: EMA, SMA , RMA, WMA , VWMA
"Period to Check Trend" is the period to create MA channel. Bigger period cause more sensitivity.
MA Period is the Length of the MA that will be checked
"Trend Channel Rate %" is rate of price channel . Price channel created by using highest/lowest of last 300 bars. I did this to make the script works on all time frames correctly.
"Use Linear Regression" is used to get rid of noise. it may cause 1-2 bars latency. (I use it)
The idea was created by LonesomeTheBlue.
Enjoy!
Stoch tripleThe script has combined the three Stochastic oscillators into one.
It analysed divergences of indicators depending on the flow of stock price, a circle mark or text mark displayed.
The maroon and red marks mean a fall, while the green and lime marks mean a rise.
Especially red and lime of mark are strong signs of decline or rise.
I hope you can make a successful investment by using three Stochastic oscillators properly.
Correlation Coefficient {Cybernetwork}Correlation Coefficient (CC): with CC momentum and acceleration oscillators, and momentum-divergence indicator.
Divergence for many indicator v3 ImprovedThis is a modificated version of original script by @LonesomeTheBlue (Thank you for giving me rights to use your code with my modification in invite-only format):
I made few changes to lessen the amount of divergences generated on the chart and how they moved along (lines without cloud with text) instead only the last cases that may be missleading for some (especially when you would use that code to generate alerts).
BEST RSI Divergences Screener (Regular and Hidden)Hello traders
My way to fight this situation is to stay productive.
Hope some of my scripts will help you out as most of us are locked-down at home, hence have more time for trading - and preparing ourselves when the sun will shine on us again
I - Concept
This is an upgrade of this script which captured only the regular divergences
This screener detects whether the regular RSI divergences based on the TradingView Divergence built-in indicator (made by the gentleman @everget I believe)
With this screener, you can see in 1 view which of your favorite cryptos/stocks/forex pairs/etc. showing strong regular and hidden divergences
The gentlemen (and demoiselles) traders can play with the lookback/ranges inputs to adjust the divergences based on what they think is best of their trading/timeframe/instrument/life
On that script screenshot, I'm showing the BYBIT:BTCUSD part of the screener matching with the divergences on the chart
II - How did I set the screener
The visual signals are as follow:
- square: whenever a regular or hidden divergence is detected
Then the colors are:
- green when there is bullish divergence
- red when there is bearish divergence
🔔🔔 I also added the alerts for capturing those bullish/bearish divergences
III - Does it repaint?
It should not :)
Best regards
Dave
BEST RSI Divergences ScreenerHello traders
I hope you're all hanging on at home with what's going on these days...
The good news is.... it gives us more time to trade ^^.... #positive #attitude
I - Concept
This screener detects whether the regular RSI divergences based on the TradingView Divergence built-in indicator (made by the gentleman @everget I believe)
With this screener, you can see in 1 view which of your favorite cryptos/stocks/forex pairs/etc. showing strong divergences
The gentlemen (and demoiselles) traders can play with the lookback/ranges inputs to adjust the divergences based on what they think is best of their trading/timeframe/instrument/life
On that script screenshot, I'm showing the BYBIT:BTCUSD part of the screener matching with the divergences on the chart
II - How did I set the screener
The visual signals are as follow:
- square: whenever a divergence is detected
Then the colors are:
- green when there is bullish regular divergence
- red when there is bearish regular divergence
Best regards
Dave