Intramarket Difference Index StrategyIntramarket Difference Indicator (IDI) Strategy:
In layman’s terms this strategy compares two indicators across (correlated) markets and exploits their differences.
📍 Import Notes:
This Strategy calculates trade position size independently, this means that the ‘Order size’ input in the ‘Properties’ tab will have no effect on the strategy. Why ? because this allows us to define custom position size algorithms which we can use to improve our risk management and equity growth over time. Here we have the option to have fixed quantity or fixed percentage of equity ATR (Average True Range) based stops in addition to the turtle trading position size algorithm.
‘Pyramiding’ does not work for this strategy’, similar to the order size input togeling this input will have no effect on the strategy as the strategy explicitly defines the maximum order size to be 1.
This strategy is not perfect, and as of writing of this post I have not traded this algo.
Always take your time to backtests and debug the strategy.
🔷 The IDI Strategy:
By default this strategy pulls data from your current TV chart and then compares it to the base market, be default BINANCE:BTCUSD . The strategy pulls SMA and RSI data from either market (we call this the difference data), standardizes the data (solving the different unit problem across markets) such that it is comparable and then differentiates the data, calling the result of this transformation and difference the Intramarket Difference (ID). The formula for the the ID is
ID = market1_diff_data - market2_diff_data (1)
Where
market(i)_diff_data = diff_data / ATR(j)_market(i)^0.5,
where i = {1, 2} and j = the natural numbers excluding 0
Formula (1) interpretation is the following
When ID > 0: this means the current market outperforms the base market
When ID = 0: Markets are at long run equilibrium
When ID < 0: this means the current market underperforms the base market
To form the strategy we define one of two strategy type’s which are Trend and Mean Revesion respectively.
🔸 Trend Case:
Given the ‘‘Strategy Type’’ is equal to TREND we define a threshold for which if the ID crosses over we go long and if the ID crosses under the negative of the threshold we go short.
The motivating idea is that the ID is an indicator of the two symbols being out of sync, and given we know volatility clustering, momentum and mean reversion of anomalies to be a stylised fact of financial data we can construct a trading premise. Let's first talk more about this premise.
For some markets (cryptocurrency markets - synthetic symbols in TV) the stylised fact of momentum is true, this means that higher momentum is followed by higher momentum, and given we know momentum to be a vector quantity (with magnitude and direction) this momentum can be both positive and negative i.e. when the ID crosses above some threshold we make an assumption it will continue in that direction for some time before executing back to its long run equilibrium of 0 which is a reasonable assumption to make if the market are correlated. For example for the BTCUSD - ETHUSD pair, if the ID > +threshold (inputs for MA and RSI based ID thresholds are found under the ‘‘INTRAMARKET DIFFERENCE INDEX’’ group’), ETHUSD outperforms BTCUSD, we assume the momentum to continue so we go long ETHUSD.
In the standard case we would exit the market when the IDI returns to its long run equilibrium of 0 (for the positive case the ID may return to 0 because ETH’s difference data may have decreased or BTC’s difference data may have increased). However in this strategy we will not define this as our exit condition, why ?
This is because we want to ‘‘let our winners run’’, to achieve this we define a trailing Donchian Channel stop loss (along with a fixed ATR based stop as our volatility proxy). If we were too use the 0 exit the strategy may print a buy signal (ID > +threshold in the simple case, market regimes may be used), return to 0 and then print another buy signal, and this process can loop may times, this high trade frequency means we fail capture the entire market move lowering our profit, furthermore on lower time frames this high trade frequencies mean we pay more transaction costs (due to price slippage, commission and big-ask spread) which means less profit.
Note it is possible that after printing a buy the strategy then prints many sell signals before returning to a buy, which again has the same implications. The image below showcases the theory above, by allowing our winner to run we may capture more profit.
Valid trades are denoted by solid green and red arrows respectively and all other valid trades which occur within the original signal are light green and red small arrows, if we were to close our trades when the IDI returns to its equilibrium of 0 our average bars per trade would be very low and we would not capture the general trend.
Note by capturing the sum of many momentum moves we are essentially following the trend hence the trend following strategy type.
Here we also print the IDI (with default strategy settings with the MA difference type), we can see that by letting our winners run we may catch many valid momentum moves, that results in a larger final pnl that if we would otherwise exit based on the equilibrium condition.
Note if you would like to plot the IDI separately copy and paste the following code in a new Pine Script indicator template.
indicator("IDI")
// INTRAMARKET INDEX
var string g_idi = "intramarket diffirence index"
ui_index_1 = input.symbol("BINANCE:BTCUSD", title = "Base market", group = g_idi)
// ui_index_2 = input.symbol("BINANCE:ETHUSD", title = "Quote Market", group = g_idi)
type = input.string("MA", title = "Differrencing Series", options = , group = g_idi)
ui_ma_lkb = input.int(24, title = "lookback of ma and volatility scaling constant", group = g_idi)
ui_rsi_lkb = input.int(14, title = "Lookback of RSI", group = g_idi)
ui_atr_lkb = input.int(300, title = "ATR lookback - Normalising value", group = g_idi)
ui_ma_threshold = input.float(5, title = "Threshold of Upward/Downward Trend (MA)", group = g_idi)
ui_rsi_threshold = input.float(20, title = "Threshold of Upward/Downward Trend (RSI)", group = g_idi)
//>>+----------------------------------------------------------------+}
// CUSTOM FUNCTIONS |
//<<+----------------------------------------------------------------+{
// construct UDT (User defined type) containing the IDI (Intramarket Difference Index) source values
// UDT will hold many variables / functions grouped under the UDT
type functions
float Close // close price
float ma // ma of symbol
float rsi // rsi of the asset
float atr // atr of the asset
// the security data
getUDTdata(symbol, malookback, rsilookback, atrlookback) =>
indexHighTF = barstate.isrealtime ? 1 : 0
= request.security(symbol, timeframe = timeframe.period,
expression = [close , // Instentiate UDT variables
ta.sma(close, malookback) ,
ta.rsi(close, rsilookback) ,
ta.atr(atrlookback) ])
data = functions.new(close_, ma_, rsi_, atr_)
data
// Intramerket Difference Index
idi(type, symbol1, malookback, rsilookback, atrlookback, mathreshold, rsithreshold) =>
threshold = float(na)
index1 = getUDTdata(symbol1, malookback, rsilookback, atrlookback)
index2 = getUDTdata(syminfo.tickerid, malookback, rsilookback, atrlookback)
// declare difference variables for both base and quote symbols, conditional on which difference type is selected
var diffindex1 = 0.0, var diffindex2 = 0.0,
// declare Intramarket Difference Index based on series type, note
// if > 0, index 2 outpreforms index 1, buy index 2 (momentum based) until equalibrium
// if < 0, index 2 underpreforms index 1, sell index 1 (momentum based) until equalibrium
// for idi to be valid both series must be stationary and normalised so both series hae he same scale
intramarket_difference = 0.0
if type == "MA"
threshold := mathreshold
diffindex1 := (index1.Close - index1.ma) / math.pow(index1.atr*malookback, 0.5)
diffindex2 := (index2.Close - index2.ma) / math.pow(index2.atr*malookback, 0.5)
intramarket_difference := diffindex2 - diffindex1
else if type == "RSI"
threshold := rsilookback
diffindex1 := index1.rsi
diffindex2 := index2.rsi
intramarket_difference := diffindex2 - diffindex1
//>>+----------------------------------------------------------------+}
// STRATEGY FUNCTIONS CALLS |
//<<+----------------------------------------------------------------+{
// plot the intramarket difference
= idi(type,
ui_index_1,
ui_ma_lkb,
ui_rsi_lkb,
ui_atr_lkb,
ui_ma_threshold,
ui_rsi_threshold)
//>>+----------------------------------------------------------------+}
plot(intramarket_difference, color = color.orange)
hline(type == "MA" ? ui_ma_threshold : ui_rsi_threshold, color = color.green)
hline(type == "MA" ? -ui_ma_threshold : -ui_rsi_threshold, color = color.red)
🔸 Mean Reversion Case:
We stated prior that mean reversion of anomalies is an standerdies fact of financial data, how can we exploit this ?
We exploit this by normalizing the ID by applying the Ehlers fisher transformation. We now assume our series is approximately normally distributed. To form the strategy we employ the same logic as for e the z score, if the FT normalized ID >< 2.5 or -2.5 respectively we buy or short respectively. We also employ the same exit conditions (fixed ATR stop and trailing Donchian Trailing stop)
🔷 Position Sizing:
If ‘‘Fixed Risk From Initial Balance’’ is toggled true this means we risk a fixed percentage of our initial balance, if false we risk a fixed percentage of our equity (current balance).
Note we also employ a volatility adjusted position sizing formula, the turtle training method which is defined as follows.
Turtle position size = (1/ r * ATR * DV) * C
Where,
r = risk factor coefficient (default is 20)
ATR(j) = risk proxy, over j times steps
DV = Dollar Volatility, where DV = (1/Asset Price) * Capital at Risk
🔷 Risk Management:
Correct money management means we can limit risk and increase reward (theoretically). Here we employ
Max loss and gain per day
Max loss per trade
Max number of consecutive losing trades until trade skip
To read more see the tooltips (info circle).
Note the ATR stop losses and take profits are defined, with the prior being default.
ATR SL and TP defined
🔷 Hurst Regime (Regime Filter):
The Hurst Exponent (H) aims to segment the market into three different states, Trending (H > 0.5), Random Geometric Brownian Motion (H = 0.5) and Mean Reverting / Contrarian (H < 0.5). In my interpretation this can be used as a trend filter that eliminates market noise.
We utilize the trending and mean reverting based states, as extra conditions required for valid trades both strategy types respectively, in the process increasing our trade entry quality.
🔷 Example model Architecture:
Here is an example of one configuration of this strategy, combining all aspect discussed in this post.
Relative-strength-index
ZORZOR (Zone of Outperformance Ratio) with Supporting Indicators
This custom indicator introduces an approach to measuring asset performance through the Zone of Outperformance Ratio (ZOR), complemented by two supporting indicators for comprehensive market analysis.
1. ZOR (Zone of Outperformance Ratio)
The ZOR is the cornerstone of this indicator, offering a unique perspective on an asset's performance across multiple time zones:
Measures the degree of an asset's outperformance against a benchmark (default: NSE:NIFTY) across different time zones
Utilizes a weighted multi-timeframe approach for a holistic performance view
Combines performance ratios from 63, 126, 189, and 252-day zones and results in a score between 0-99, with higher scores indicating stronger outperformance across zones
Key Features:
Fully configurable weights for each timeframe (63, 126, 189, 252 days)
Customizable benchmark symbol
Color-coded display: Blue for scores ≥60 (strong performance), Red for scores <60 (weaker performance)
2. Supporting Indicators
To enhance analysis and provide context to the ZOR score, two additional indicators are included:
a) Distance to 52-week High:
Calculates the percentage distance between current price and 52-week high
Color-coded for quick interpretation:
Yellow-green when price is above 52-week high
Dark green when price is below 52-week high
Helps identify potential overbought conditions or breakout scenarios
b) Distance to EMA:
Shows percentage distance from current price to a user-defined EMA (default: 21-day)
Helps gauge short-term momentum relative to the trend
Useful for identifying potential mean reversion opportunities
Originality and Usefulness
The ZOR indicator offers a fresh perspective on relative performance by:
Combining multiple timeframes into a single, easy-to-interpret score
Applying a non-linear transformation to emphasize recent performance
Providing a flexible framework for comparing assets against any chosen benchmark
The supporting indicators complement the ZOR by offering additional context:
Distance to 52-week High helps identify potential trend strength and breakout scenarios
Distance to EMA provides insights into short-term momentum and potential mean reversion
This combination allows traders to:
Quickly identify outperforming assets across multiple timeframes
Assess whether an asset is extended from its long-term highs or short-term average
Make more informed decisions by considering relative performance, trend strength, and momentum in a single view
How to Use
1. Add the indicator to your chart
2. Customize settings in the indicator properties:
- Set benchmark symbol
- Toggle visibility of supporting indicators
- Customize EMA length for Distance to EMA
- Adjust ZOR calculation weights(Optional)
3. Interpret the color-coded labels:
- ZOR: Blue (strong performance) or Red (weaker performance)
- Distance to High: Yellow-green (above 52-week high) or Dark green (below)
- Distance to EMA: Purple label showing percentage
4. Use in conjunction with other technical and fundamental analysis for comprehensive trading decisions
This indicator provides a unique, multi-faceted approach to performance analysis, combining relative strength measurement with trend and momentum indicators for a holistic market view.
RSI DeviationAn oscillator which de-trends the Relative Strength Index. Rather, it takes a moving average of RSI and plots it's standard deviation from the MA, similar to a Bollinger %B oscillator. This seams to highlight short term peaks and troughs, Indicating oversold and overbought conditions respectively. It is intended to be used with a Dollar Cost Averaging strategy, but may also be useful for Swing Trading, or Scalping on lower timeframes.
When the line on the oscillator line crosses back into the channel, it signals a trade opportunity.
~ Crossing into the band from the bottom, indicates the end of an oversold condition, signaling a potential reversal. This would be a BUY signal.
~ Crossing into the band from the top, indicates the end of an overbought condition, signaling a potential reversal. This would be a SELL signal.
For ease of use, I've made the oscillator highlight the main chart when Overbought/Oversold conditions are occurring, and place fractals upon reversion to the Band. These repaint as they are calculated at close. The earliest trade would occur upon open of the following day.
I have set the default St. Deviation to be 2, but in my testing I have found 1.5 to be quite reliable. By decreasing the St. Deviation you will increase trade frequency, to a point, at the expense of efficiency.
Cheers
DJSnoWMan06
RSI AcceleratorThe Relative Strength Index (RSI) is like a fitness tracker for the underlying time series. It measures how overbought or oversold an asset is, which is kinda like saying how tired or energized it is.
When the RSI goes too high, it suggests the asset might be tired and due for a rest, so it could be a sign it's gonna drop. On the flip side, when the RSI goes too low, it's like the asset is pumped up and ready to go, so it might be a sign it's gonna bounce back up. Basically, it helps traders figure out if a stock is worn out or revved up, which can be handy for making decisions about buying or selling.
The RSI Accelerator takes the difference between a short-term RSI(5) and a longer-term RSI(14) to detect short-term movements. When the short-term RSI rises more than the long-term RSI, it typically refers to a short-term upside acceleration.
The conditions of the signals through the RSI Accelerator are as follows:
* A bullish signal is generated whenever the Accelerator surpasses -20 after having been below it.
* A bearish signal is generated whenever the Accelerator breaks 20 after having been above it.
RSI Overbought/Oversold [Overlay Highlighter]Indicator to show when the RSI is in oversold(Below 30) or overbought (Above 70) conditions. The background color of the chart changes colors in the areas where the above conditions are met.
Price can often reverse in these areas. However, this depends on the strength of the trend and price may continue higher or lower in the direction of the overall trend.
Divergence has been added to aid the user in timing reversals. Divergences are plotted by circles above or below the candles. Divergence is confirmed so there is a delay of one candle before the signal is given on the previous candle. Again, everything depends on the strength of the trend so use proper risk management.
Once the RSI has entered into oversold/overbought conditions, it is recommended to wait for divergence before entering into the trade near areas of support or resistance. It is recommended to utilize this strategy on the H4 timeframe, however, this particular strategy works on all timeframes.
This indicator is a modified version of seoco's RSI Overbought/Oversold + Divergence Indicator . The user interface has been refined, is now overlayed on the chart, and my own divergence code has been inserted.
RSI over screener (any tickers)█ OVERVIEW
This screener allow you to watch up to 240 any tickers you need to check RSI overbought and oversold using multiple periods, including the percentage of RSIs of different periods being overbought/oversold, as well as the average between these multiple RSIs.
█ THANKS
LuxAlgo for his RSI over multi length
I made function for this RSI and screener based on it.
allanster for his amazing idea how to split multiple symbols at once using a CSV list of ticker IDs
█ HOW TO USE
- hide chart:
- add 6 copies of screener
- change list number at settings from 1 to 6
- add you tickers
Screener shows signals when RSI was overbought or oversold and become to 0, this signal you may use to enter position(check other market condition before enter).
At settings you cam change Prefics, Appendix and put you tickers.
limitations are:
- max 40 tickers for one list
- max 4096 characters for one list
- tickers list should be separated by comma and may contains one space after the comma
By default it shows almost all BINANCE USD-M USDT tickers
Also you can adjust table for your screen by changing width of columns at settings.
If you have any questions or suggestions write comment or message.
Supertrended RSI [AlgoAlpha]🚀📈 Introducing the Supertrended RSI Indicator by AlgoAlpha!
Designed to empower your trading decisions, this innovative Pine Script™ creation marries the precision of the Relative Strength Index (RSI) with the dynamic prowess of the SuperTrend methodology. Whether you’re charting the course of cryptos, riding the waves of stock markets, or navigating the futures landscape, our SuperTrended RSI Indicator is your go-to tool for uncovering unique trend insights and crafting trading strategies. 🌟
Key Features:
🔍 Enhanced RSI Analysis: Combines the traditional RSI with a supertrend calculation for a dynamic look at market trends.
🔄 Multiple Moving Averages: Offers a selection of moving averages including SMA, HMA, EMA, and more for tailored analysis.
🎨 Customizable Visuals: Choose your own color scheme for uptrends and downtrends to match your trading dashboard.
📊 Flexible Input Settings: Tailor the indicator with customizable lengths, factors, and smoothing options.
⚡ Real-Time Alerts: Set alerts for bullish and bearish reversals to stay ahead of market movements.
Quick Guide to Using the Supertrended RSI Indicator
Maximize your trading with the Supertrended RSI by following these streamlined steps! 🚀✨
🛠 Add the Indicator: Search for "Supertrended RSI " in TradingView's Indicators & Strategies. Customize settings like RSI length, MA type, and Supertrend factors to fit your trading style.
🎨 Visual Customization: Adjust uptrend and downtrend colors for clear trend visualization.
📊 Market Analysis: Watch for the Supertrend color change for trend reversals. Use the 70 and 30 lines to spot overbought/oversold conditions.
🔔 Alerts: Enable notifications for reversal conditions to capture trading opportunities without constant chart monitoring.
How It Works:
At the core of this indicator is the combination of the Relative Strength Index (RSI) and the Supertrend framework, it does so by applying the SuperTrend on the RSI. The RSI settings can be adjusted for length and smoothing, with the option to select the data source. The Supertrend calculation takes into account a specified trend factor and the Average True Range (ATR) over a given period to determine trend direction.
Visual elements include plotting the RSI, its moving average, and the Supertrend line, with customizable colors for clarity. Overbought and oversold conditions are highlighted, and trend changes are filled with distinct colors.
🔔 Alerts: Enable alerts for crossover and crossunder events to catch every trading opportunity.
🌈 Whether you're a seasoned trader or just starting, the Supertrended RSI offers a fresh perspective on market trends. 📈
💡 Tip: Experiment with different settings to find the perfect balance for your trading style!
🔗 Explore, customize, and enhance your trading experience with the Supertrended RSI Indicator! Happy trading! 🎉
MUJBOT - Multi-TF RSI Table
The "Multi-TF RSI Table" indicator is a comprehensive tool designed to present traders with a quick visual summary of the Relative Strength Index (RSI) across multiple timeframes, all within a single glance. It is crafted for traders who incorporate multi-timeframe analysis into their trading strategy, aiming to enhance decision-making by identifying overall market sentiment and trend direction. Here's a rundown of its features:
User Inputs: The indicator includes customizable inputs for the RSI and Moving Average (MA) lengths, allowing users to tailor the calculations to their specific trading needs. Additionally, there is an option to display or hide the RSI & MA table as well as to position it in various places on the chart for optimal visibility.
Multi-Timeframe RSI & MA Calculations: It fetches RSI and MA values from different timeframes, such as 1 minute (1m), 5 minutes (5m), 15 minutes (15m), 1 hour (1h), 4 hours (4h), and 1 day (1D). This multi-timeframe approach provides a thorough perspective of the momentum and trend across different market phases.
Trend and Sentiment Analysis: For each timeframe, the script determines whether the average RSI is above or below the MA, categorizing the trend as "Rising", "Falling", or "Neutral". Moreover, it infers market sentiment as "Bullish" or "Bearish", based on the relationship between the RSI and its MA.
Dynamic Color-Coding: The indicator uses color-coding to convey information quickly. It highlights the trend and sentiment cells in the table with green for "Bullish" and red for "Bearish" conditions. It also shades the timeframe cells based on the RSI value, with varying intensities of green for "Oversold" conditions and red for "Overbought" conditions, providing an immediate visual cue of extreme market conditions.
Customization and Adaptability: The script is designed with customization in mind, enabling users to adjust the RSI and MA lengths according to their trading strategy. Its adaptable interface, which offers the option to display or hide the RSI & MA table, ensures that the tool fits into different trading setups without cluttering the chart.
Ease of Use: By consolidating critical information into a simple table, the "Multi-TF RSI Table" indicator saves time and simplifies the analysis process for traders. It eliminates the need to switch between multiple charts or timeframes, thus streamlining the trading workflow.
In essence, the "Multi-TF RSI Table" is a powerful indicator for Pine Script users on TradingView, offering a multi-dimensional view of market dynamics. It is ideal for both novice and experienced traders who seek to enhance their technical analysis with an at-a-glance summary of RSI trends and market sentiment across various timeframes.
Amazing Oscillator (AO) [Algoalpha]Description:
Introducing the Amazing Oscillator indicator by Algoalpha, a versatile tool designed to help traders identify potential trend shifts and market turning points. This indicator combines the power of the Awesome Oscillator (AO) and the Relative Strength Index (RSI) to create a new indicator that provides valuable insights into market momentum and potential trade opportunities.
Key Features:
Customizable Parameters: The indicator allows you to customize the period of the RSI calculations to fine-tune the indicator's responsiveness.
Visual Clarity: The indicator uses user-defined colors to visually represent upward and downward movements. You can select your preferred colors for both bullish and bearish signals, making it easy to spot potential trade setups.
AO and RSI Integration: The script combines the AO and RSI indicators to provide a comprehensive view of market conditions. The RSI is applied to the AO, which results in a standardized as well as a less noisy version of the Awesome Oscillator. This makes the indicator capable of pointing out overbought or oversold conditions as well as giving fewer false signals
Signal Plots: The indicator plots key levels on the chart, including the RSI threshold(Shifted down by 50) at 30 and -30. These levels are often used by traders to identify potential trend reversal points.
Signal Alerts: For added convenience, the indicator includes "x" markers to signal potential buy (green "x") and sell (red "x") opportunities based on RSI crossovers with the -30 and 30 levels. These alerts can help traders quickly identify potential entry and exit points.
Bollinger RSI BandsIndicator Description:
The "Bollinger RSI Bands" is an advanced technical analysis tool designed to empower traders with comprehensive insights into market trends, reversals, and overbought/oversold conditions. This multifaceted indicator combines the unique features of candle coloration and Bollinger Bands with the Relative Strength Index (RSI), making it an indispensable tool for traders seeking to optimize their trading strategies.
Purpose:
The primary purpose of the "Bollinger RSI Bands" indicator is to provide traders with a holistic view of market dynamics by offering the following key functionalities:
Candle Coloration: The indicator's signature candle colors - green for bullish and red for bearish - serve as a visual representation of the prevailing market trend, enabling traders to quickly identify and confirm market direction.
RSI-Based Moving Average: A smoothed RSI-based moving average is plotted, facilitating the detection of trend changes and potential reversal points with greater clarity.
RSI Bands: Upper and lower RSI bands, set at 70 and 30, respectively, help traders pinpoint overbought and oversold conditions, aiding in timely entry and exit decisions.
Bollinger Bands: In addition to RSI bands, Bollinger Bands are overlaid on the RSI-based moving average, offering insights into price volatility and highlighting potential breakout opportunities.
How to Use:
To maximize the utility of the "Bollinger RSI Bands" indicator, traders can follow these essential steps:
Candle Color Confirmation: Assess the color of the candles. Green candles signify a bullish trend, while red candles indicate a bearish trend, providing a clear and intuitive visual confirmation of market direction.
Overbought and Oversold Identification: Monitor price levels relative to the upper RSI band (70) for potential overbought signals and below the lower RSI band (30) for potential oversold signals, allowing for timely adjustments to trading positions.
Trend Reversal Recognition: Observe changes in the direction of the RSI-based moving average. A transition from bearish to bullish, or vice versa, can serve as a valuable signal for potential trend reversals.
Volatility and Breakout Opportunities: Keep a watchful eye on the Bollinger Bands. Expanding bands signify increased price volatility, often signaling forthcoming breakout opportunities.
Why Use It:
The "Bollinger RSI Bands" indicator offers traders several compelling reasons to incorporate it into their trading strategies:
Clear Trend Confirmation: The indicator's distinct candle colors provide traders with immediate confirmation of the current trend direction, simplifying trend-following strategies.
Precise Entry and Exit Points: By identifying overbought and oversold conditions, traders can make more precise entries and exits, optimizing their risk-reward ratios.
Timely Trend Reversal Signals: Recognizing shifts in the RSI-based moving average direction allows traders to anticipate potential trend reversals and adapt their strategies accordingly.
Volatility Insights: Bollinger Bands offer valuable insights into price volatility, aiding in the identification of potential breakout opportunities.
User-Friendly and Versatile: Despite its advanced features, the indicator remains user-friendly and versatile, catering to traders of all experience levels.
In summary, the "Bollinger RSI Bands" indicator is an indispensable tool for traders seeking a comprehensive view of market dynamics. With its unique combination of candle coloration and Bollinger Bands, it empowers traders to make more informed and strategic trading decisions, ultimately enhancing their trading outcomes.
Note: Always utilize this indicator in conjunction with other technical and fundamental analysis tools and exercise prudence in your trading decisions. Past performance is not indicative of future results.
Laguerre RSI - non repaintingIt seems that the traditional Laguerre* functions repaint due to the gamma parameter.
That goes even for the editorial pick here.
But one could use calculation period instead of "gamma" parameter. This gives us a non-repainting Laguerre RSI fit for scalping trends.
At first glance, I haven't seen anyone do this with a pine script, but I could be wrong because it's not a big deal.
So here is a variation of Laguerre RSI, without repainting. It's a little bit more insensitive, but this is not of great importance, since only the extreme values are used for confirmation.
( * Laguerre RSI is based on John EHLERS' Laguerre Filter to avoid the noise of RSI.)
And if you implement this indicator into a strategy (like I do) I can give you a trick.
Traditionaly the condition is at follows:
LaRSI = cd == 0 ? 100 : cu / (cu + cd)
(this is the final part of the indicator before the plotting)
LongLaguerre= LaRSIupb
It's fine for the short (ot exit long), but for the long is better to make a swich between the CD and CU parameters, as follows:
LaRSI1 = cd == 0 ? 100 : cu / (cu + cd)
LaRSI2 = cu == 0 ? 100 : cu / (cu + cd)
LongLaguerre= LaRSI2upb
Ultimate RSI [LuxAlgo]The Ultimate RSI indicator is a new oscillator based on the calculation of the Relative Strength Index that aims to put more emphasis on the trend, thus having a less noisy output. Opposite to the regular RSI, this oscillator is designed for a trend trading approach instead of a contrarian one.
🔶 USAGE
While returning the same information as a regular RSI, the Ultimate RSI puts more emphasis on trends, and as such can reach overbought/oversold levels faster as well as staying longer within these areas. This can avoid the common issue of an RSI regularly crossing an overbought or oversold level while the trend makes new higher highs/lower lows.
The Ultimate RSI crossing above the overbought level can be indicative of a strong uptrend (highlighted as a green area), while an Ultimate RSI crossing under the oversold level can be indicative of a strong downtrend (highlighted as a red area).
The Ultimate RSI crossing the 50 midline can also indicate trends, with the oscillator being above indicating an uptrend, else a downtrend. Unlike a regular RSI, the Ultimate RSI will cross the midline level less often, thus generating fewer whipsaw signals.
For even more timely indications users can observe the Ultimate RSI relative to its signal line. An Ultimate RSI above its signal line can indicate it is increasing, while the opposite would indicate it is decreasing.
🔹 Smoothing Methods
Users can return more reactive or smoother results depending on the selected smoothing method used for the calculation of the Ultimate RSI. Options include:
Exponential Moving Average (EMA)
Simple Moving Average (SMA)
Wilder's Moving Average (RMA)
Triangular Moving Average (TMA)
These are ranked by the degree of reactivity of each method, with higher ones being more reactive (but less smooth).
Users can also select the smoothing method used by the signal line.
🔶 DETAILS
The RSI returns a normalized exponential average of price changes in the range (0, 100), which can be simply calculated as follows:
ema(d) / ema(|d|) × 50 + 50
where d represent the price changes. In order to put more emphasis on trends we can put higher weight on d . We can perform this on the occurrence of new higher highs/lower lows, and by replacing d with the rolling range instead (the rolling period used to detect the higher highs/lower lows is equal to the length setting).
🔶 SETTINGS
Length: Calculation period of the indicator
Method: Smoothing method used for the calculation of the indicator.
Source: Input source of the indicator
🔹 Signal Line
Smooth: Degree of smoothness of the signal line
Method: Smoothing method used to calculation the signal line.
Enhanced Smoothed RSIThe "Enhanced Smoothed RSI Factor" indicator is a robust technical analysis tool designed to assist traders in identifying potential trends and reversals. This indicator combines elements of the Relative Strength Index (RSI) with a smoothed factor, enhancing its reliability and responsiveness. By visualizing the Enhanced Smoothed RSI Factor alongside the standard RSI and their associated upper and lower bands, traders gain insights into potential overbought and oversold conditions, facilitating more informed trading decisions.
How to Use:
Inputs Configuration : Adjust the indicator's parameters according to your trading preferences. Modify the source data (source) to suit the price data you want to analyze. Set the RSI period (rsiPeriod) for RSI calculations, the moving average period (movingAvgPeriod) for the bands, and the smoothing factor (factor) for enhanced responsiveness.
Enhanced Smoothed RSI Factor : The indicator calculates the Enhanced Smoothed RSI Factor by applying an exponential moving average (EMA) to the RSI values. This factor reflects changes in price momentum.
Comparison with Standard RSI : Observe the Enhanced Smoothed RSI Factor and the standard RSI side by side on your chart. While the standard RSI offers insights into price momentum, the Enhanced Smoothed RSI Factor adds an extra layer of smoothing for potentially clearer trend indications.
Bands and Bar Coloring : The indicator plots upper and lower bands, which are derived from weighted and simple moving averages of the Enhanced Smoothed RSI Factor. The color of the bars changes based on the position of the Enhanced Smoothed RSI Factor relative to the bands. Green bars indicate values above the upper band, red bars indicate values below the lower band, and gray bars indicate values within the bands.
Overbought and Oversold Levels : The indicator provides horizontal lines at levels 140 and 80. When the Enhanced Smoothed RSI Factor crosses above 140, it suggests a potential bullish trend, while crossing below 80 suggests a potential bearish trend. Additionally, levels 200 and 180 indicate overbought conditions, and levels 100 and 80 indicate oversold conditions.
Additional Insights : The indicator's upper and lower bands provide valuable insights into potential trend reversals. When the Enhanced Smoothed RSI Factor crosses above the upper band, it may signal an overextended bullish trend. Conversely, a crossover below the lower band may indicate an overextended bearish trend.
Important Considerations :
This indicator is most effective when used in conjunction with other technical analysis tools and strategies.
It's recommended to avoid making trading decisions solely based on the Enhanced Smoothed RSI Factor. Combine it with other indicators, chart patterns, and fundamental analysis.
Adjust the overbought and oversold levels to align with your trading strategy and the specific market conditions.
Please remember that trading involves risks, and the indicator's signals are not guaranteed. Always conduct thorough research and consider using a practice account before implementing any trading strategy.
Relative Strength Index w/ STARC Bands and PivotsThis is an old script that I use with some useful RSI strategies from "Technical Analysis for the Trading Professional" 2nd edition by Constance Brown.
The base RSI comes with the option for custom length, and has some pre-configured ranges for looking at exits and entrances. The idea is to be bullish when bounces happen in the red zone during an already bullish trend or when the indicator enters green without a rejection. Be bearish if the indicator falls through the red zone or fails to enter green during an already bearish trend.
I have added the formulas used for creating STARC bands (just think fancier volatility bands) with adjustable tolerances. The idea is to look out for when the RSI touches one of the bands and reverses. This is usually indicative of a strong reversal (though the timing will be up to the trader). Best use this on shorter time frames during a volatile time of a stock's price action.
Although a little messy, there is a small segment of the script which includes pivot points. I like to use these because they make indicating local highs/lows for finding divergences easier.
Finally, I have added a couple of customizable EMAS for the RSI itself. Useful when combined with the other features!
Waddah Attar Explosion with TDI First of all, a big shoutout to @shayankm, @LazyBear, @Bromley, @Goldminds and @LuxAlgo, the ones that made this script possible.
This is a version of Waddah Attar Explosion with Traders Dynamic Index.
WAE provides volume and volatility information. Also, WAE calculation was changed to a full-on MACD, to provide the momentum: the idea is to "assess" which MACD bars have significant momentum (i.e. crossover the Explosion Line)
TDI provides momentum, divergences as well as overbought and oversold areas. There is also a RSI on a different timeframe, for convergence.
Almost everything is editable:
- All moving averages are customizable, including the TRAMA, from @LuxAlgo
Waddah Attar Explosion_
- Three different crossing signals: histogram crossing contracting Explosion Line, expanding Explosion Line and ascending Explosion Line while both Bolling Bands are expanding; Explosion Line shows different color when expanding.
- Explosion line signals: Below DeadZone line and Exhaustion (highest value in a given lookback period). You can set a predefined EPL slope to filter out some noise.
- Deadzone signal : Deadzone squeeze ( lowst value in a given lookback period)
TDI:
- Overbought an Oversold signals. The OB and OS shapes have two colors, in order to display extreme signals on current timeframe or extreme signals on current and different time frame.
- Visual display of RSI outside the Bollinger Bands, and crossing of RSI Moving Average crossing of zero line.
I believe this combination is great for so many reasons!
Like the idea of TTM Squeeze? You can tune the Deadzone and Explosion lines to look for a volatility breakout
Like trading divergences or want to filter out extreme areas? The RSI is great for that
You like the using the MACD strategy but don't like the amount of false signals given? this WAE version filters some of them out.
If you are a Bollinger bands fan, you can customize both indicators to trade breakouts and/or mean reversion strategies, and filter out exhaustion of the bands expansion
This is my first publication, so give it a go and provide feedback if possible.
RSI Pull-BackA pull-back occurs whenever the price or the value of an indicator breaks a line and comes back to test it before continuing in the prevailing trend.
The RSI has oversold and overbought levels such as 20 and 80 and whenever the market breaks them returns to normality, we can await a pull-back to them before the reversal continues.
This indicator shows the following signals:
* A bullish signal is generated whenever the RSI surpasses the chosen oversold level then directly shapes a pull-back to it without breaking it again.
* A bearish signal is generated whenever the RSI breaks the chosen overbought level then directly shapes a pull-back to it without surpassing it again.
RSI Candle Advanced V2RSI Advanced
As the period value is longer than 14, the RSI value sticks to the value of 50 and becomes useless.
Also, when the period value is less than 14, it moves excessively, so it is difficult for us to see the movement of the RSI .
So, using the period value and the RSI value as variables, I tried to make it easier to identify the RSI value through a new function expression.
This is how RSI Advanced was developed.
Period below 14 reduce the volatility of RSI , and period above 14 increase the volatility of RSI, allowing overbought and oversold zones to work properly and give you a better view of the trend.
By applying the custom algorithm so that the 'RSI Advanced' with period on a 5-minute timeframe has the same value as the 'original RSI' with period on a 60-minute timeframe.
As another example, an 'RSI Advanced' with a period in a 60-minute time frame has the same value as an 'original RSI' with a period in a 240-minute time frame.
Compare the difference in the RSI with a period value of 200 in the snapshot.
------------------------------------------------------------------------------------------
RSI Candlestick
RSI derives its value using only the closing price as a variable.
I solved the RSI equation in reverse and tried to include the high and low prices of candlesticks in the equation.
As a result, 'if the high or low was the closing price, the value of RSI would be like this' was implemented.
Just like when a candle comes down after setting a high price, an upper tail is formed when RSI Candle goes down after setting a high price!!
In divergence, we had to look only at the relationship between closing prices, but if we use RSI candles, we can find divergences in highs and highs, and lows and lows.
Existing indicators could not express "gap", but Version 2 made it possible to express "gap"!!!!!!
RSI can be displayed as candlesticks, bars and lines
Then enjoy my RSI!
----------------------------------------------------------------------------------------
RSI Advanced
기간값이 14보다 길어질수록 RSI값은 50값에 달라붙게 되어서 쓸모가 없어집니다.
또 기간값이 14보다 줄어들수록 과도하게 움직여서 우리는 RSI의 움직임을 보기가 힘듭니다.
그래서 기간 값과 RSI 값을 변수로 사용하여 새로운 함수 식을 통해 RSI 값을 식별하기 편하도록 해보았습니다.
이렇게 RSI Advanced가 개발되었습니다.
기간값이 14보다 낮으면 rsi의 변동폭이 줄어들고, 기간값이 14보다 크면 변동폭이 넓어져 과매수 및 과매도 영역이 제대로 작동하여 추세를 더 잘 볼 수 있습니다.
또한 저는 5분 타임프레임의 기간값이 168(=14*12)인 RSI가 주기 값이 14인 60분 타임프레임의 RSI와 동일한 값을 갖도록 적절한 함수 표현식을 적용하여 RSI를 변경했습니다.
다른 예로, 15분 시간 프레임에서 기간값이 56(=14*4)인 RSI는 60분 시간 프레임의 기간값이 14인 RSI와 동일한 값을 갖습니다.
기간값이 200인 RSI의 차이를 스냅샷에서 비교해보십시오.
-----------------------------
RSI Candlestick
RSI는 종가만을 변수로 사용하여 값을 도출해냅니다.
저는 RSI 식을 역으로 풀어내어서 캔들스틱의 고가와 저가, 시가를 식에 포함시켜보았습니다.
결과적으로, '만약 고가나 저가가 종가였다면 RSI의 값이 이럴것이다'를 구현해내었습니다.
캔들이 고가를 찍고 내려오면 윗꼬리가 생기듯 RSI Candle에서도 고가를 찍고 내려오면 윗꼬리가 생기는겁니다!!
다이버전스 또한 원래는 종가끼리의 관계만 봐야했지만 RSI 캔들을 이용한다면 고가와 고가, 저가와 저가에서도 다이버전스를 발견할 수 있습니다.
기존의 지표는 "갭"을 표현하지 못했지만 Version 2 에서는 "갭"을 표현할 수 있게 만들었습니다!!!!!!
그럼 잘 사용해주십시오!!!
Relative Strength Index (RSI) + Realtime DivergencesRelative Strength Index (RSI) + Realtime Divergences
This version of the RSI indicator includes the following features:
- Optional divergence lines drawn directly onto the oscillator in realtime.
- Configurable alerts to notify you when divergences occur.
- Configurable lookback periods to fine tune the divergences drawn in order to suit different trading styles and timeframes.
- Background colouring option to indicate when the RSI oscillator has crossed above or below its centerline.
- Alternate timeframe feature allows you to configure the oscillator to use data from a different timeframe than the chart it is loaded on.
- Fadeout oscillator feature will fade out all but the most recent history, leaving your chart free of visual noise.
- Flip oscillator feature can be used with the Tradingview 'Flip chart' feature (Alt+i) in order to flip both the chart and the oscillator, too. This feature is to help traders manually spot divergences that may have a strong natural bias in one direction.
- Optional centerline and range bands.
- Various optional moving average types, bollinger bands etc.
This indicator adds additional features onto the standard RSI whose core calculations remain unchanged. Namely, the configurable option to automatically, quickly and clearly draw divergence lines onto the oscillator for you as they occur in realtime. It also has the addition of unique alerts, so you can be notified when divergences occur without spending all day watching the charts. Furthermore, this version of the RSI comes with configurable lookback periods, which can be configured in order to adjust the sensitivity of the divergences, in order to suit shorter or higher timeframe trading approaches.
What is the Relative Strength Index ( RSI )?
Investopedia describes the Relative Strength Index as follows:
“The relative strength index (RSI) is a momentum indicator used in technical analysis. RSI measures the speed and magnitude of a security's recent price changes to evaluate overvalued or undervalued conditions in the price of that security. The RSI is displayed as an oscillator (a line graph) on a scale of zero to 100. The indicator was developed by J. Welles Wilder Jr. and introduced in his seminal 1978 book, New Concepts in Technical Trading Systems.
The RSI can do more than point to overbought and oversold securities. It can also indicate securities that may be primed for a trend reversal or corrective pullback in price. It can signal when to buy and sell. Traditionally, an RSI reading of 70 or above indicates an overbought situation. A reading of 30 or below indicates an oversold condition.”
The RSI is also commonly used to spot divergences.
You can read more about the RSI and its calculations here
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis , meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level . A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose.
Configurable pivot periods.
You can adjust the default pivot periods to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action.
Disclaimer: This script includes code from the stock RSI by Tradingview as well as the Divergence for Many Indicators v4 by LonesomeTheBlue.
Strength of Divergence Across Multiple IndicatorsOverview:
One-stop shop for all your divergence needs, including:
(1) A single metric for divergence strength across multiple indicators.
(2) Labels that make it easy to spot where the truly strong divergence is by showing the overall divergence strength value along with the number of divergent indicators. Hovering over the label shows a breakdown of each divergent indicator and its individual divergence strength value.
(3) Fully customizable, including inputs for pivot lengths, divergence types, and weights for every component of the divergence strength calculation. This allows you to quickly and easily optimize the output for any chart. Don't worry, the default settings will have you covered if you're not interested in what's going on under the hood.
The Divergence Strength Calculation:
The total divergence strength value is the sum of the divergence strengths of all indicators for which divergence was detected at a given bar. Each indicator's individual divergence strength is comprised of two basic components: (1) |ΔPrice| - the magnitude of the change in price over the divergence period (pivot-to-pivot), and (2) |ΔIndicator| - the magnitude of the change in indicator value over the divergence period.
Because different indicators' scales and volatility can vary greatly, the Δ values are expressed in terms of standard deviation to ensure that the values are meaningful and equitable across all indicators and assets/instruments/currency pairs, etc:
|ΔIndicator| = |indicator_value_1 - indicator_value_2| / 2 * StDev(indicator_series,100)
Calculation Weights:
All components of the calculation are weighted and can be modified on the Inputs page in settings (weights are simply multipliers). For example, if you think hidden divergence should carry less weight than regular divergence, you can assign it a lesser weight. Or if you think RSI divergence is worth more than OBV divergence, you can adjust their weights accordingly. List of weights:
Regular divergence weight - default = 1
Hidden divergence weight - default = 1
ΔPrice weight - default = 0.5 (multiplied by the ΔPrice component)
ΔIndicator weight - default = 1.5 (multiplied by the ΔIndicator component)
RSI weight - default = 1.1
OBV weight - default = 0.8
MACD weight - default = 0.9
STOCH weight - default = 0.9
Development for additional indicators is ongoing, as is research into the optimal weight configuration(s).
Other Inputs:
Pivot lengths - specify the number of bars before and after each pivot high/low to consider it a valid candidate for divergence.
Lookback bars and Lookback pivots - specify the number of bars or the number of pivots to look back across.
Price sources - specify separate price sources for bullish and bearish divergence
Display settings - specify how lines and labels should display, including which divergence strength values should show the largest labels. Include/exclude specific divergence types and indicators.
Please report any bugs, or let me know if you have any enhancement suggestions or requests for additional indicators.
@reees
Double RSI FilterI've seen several youtubers using 2 RSI's on top of one another to filter trades for their strategies. I figured I would just code it up as an all-in-one indicator for people who have the basic package. This way they have an extra slot for another indicator if they need one and also for convenience.
Longs only when RSI 1 is above RSI 2 and shorts only when opposite. The arrows show where crosses of the RSI's occur.
Let me know if there is something else like this where it would just be very convenient to have 2 indicators on one window or other such things and I'll see if I can do something for you guys in my spare time. I'm just an amateur coder, but learning as I do more of these for people.
Thank you!
Hope this helps someone! :)
Screener for 40+ instrumentsAs you probably know in TradingView there is a limit of 40 instruments in one custom screener.
I created a script that will allow you to scan more symbols.
The idea of it is pretty simple. You have to add a screener a few times on your screen with a different set of symbols. Then select column width (as % of your chart width) and # of the screener right to left.
Script will plot #1 screener next to the right border. For #2 and all next tables, the script will compute the needed offset and will draw it on the left. This way it will look like one table and not a few separate indicators.
I created a script with an RSI screener, but you can create more complicated examples with it.
Off course, that's not a silver bullet solution but might work for some of you.
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
Multi-Timeframe RSI GridThe relative strength index (RSI) is a momentum indicator that measures the magnitude of recent price changes to evaluate overbought or oversold conditions. The RSI is normally displayed as an oscillator separately from price and can have a reading from 0 to 100. This indicator displays the current RSI levels at up to 6 timeframes (of your choosing) in a grid. If the RSI levels reach overbought (above 70) or oversold (below 30) conditions, it changes the color to help you see that RSI has reached extreme levels. Note that in TradingView, when the chart is on a higher timeframe, the lower timeframe RSI levels don't calculate properly. If those conditions are met, this indicator will hide those values in the grid. If none of your selected values are available, it hides the table completely. There are configuration options, like:
Position the grid in any corner of the screen
Style customization (color, size)
Customize RSI length
RSI Levels, Multi-TimeframeThe relative strength index (RSI) is a momentum indicator that measures the magnitude of recent price changes to evaluate overbought or oversold conditions. RSI is normally displayed as an oscillator separately from price and can have a reading from 0 to 100. This indicator takes the RSI and plots the 30 & 70 levels onto the price chart so you can see when price is going to meet the 30 or 70 levels. The reason the 30 & 70 levels are important is because many traders (and bots) use those as signals to buy (at 30 RSI) or sell (at 70 RSI). Additionally, this indicator allows you to display not just the RSI levels of your currently viewed timeframe on the chart, but also shows the RSI levels of up to 6 different timeframes on the same chart. This allows you to quickly see if multiple RSI levels are aligning across different timelines, which is an even stronger indication that price is going to change direction when it meets those levels on the chart. There are a lot of nice configuration options, like:
Style customization (color, thickness, size)
Labels on the chart so you can tell which plots are the RSI levels
Optionally display the plot as a horizontal line if all you care about is the RSI level right now
Toggle overbought (RSI 70) or oversold (RSI 30) on/off completely