RSI Strategy with Adjustable RSI and Stop-LossThis trading strategy uses the Relative Strength Index (RSI) and a Stop-Loss mechanism to make trading decisions. Here’s a breakdown of how it works:
RSI Calculation:
The RSI is calculated based on the user-defined length (rsi_length). This is a momentum oscillator that measures the speed and change of price movements.
Buy Condition:
The strategy generates a buy signal when the RSI value is below a user-defined threshold (rsi_threshold). This condition indicates that the asset might be oversold and potentially due for a rebound.
Stop-Loss Mechanism:
Upon triggering a buy signal, the strategy calculates the Stop-Loss level. The Stop-Loss level is set to a percentage below the entry price, as specified by the user (stop_loss_percent). This level is used to limit potential losses if the price moves against the trade.
Sell Condition:
A sell signal is generated when the current closing price is higher than the highest high of the previous day. This condition suggests that the price has reached a new high, and the strategy decides to exit the trade.
Plotting:
The RSI values are plotted on the chart for visual reference. A horizontal line is drawn at the RSI threshold level to help visualize the oversold condition.
Summary
Buying Strategy: When RSI is below the specified threshold, indicating potential oversold conditions.
Stop-Loss: Set based on a percentage of the entry price to limit potential losses.
Selling Strategy: When the price surpasses the highest high of the previous day, signaling a potential exit point.
This strategy aims to capture potential rebounds from oversold conditions and manage risk using a Stop-Loss mechanism. As with any trading strategy, it’s essential to test and optimize it under various market conditions to ensure its effectiveness.
Oscillators
RSI-based MACDThe RSI is one of the most popular indicators available. This indicator, which represents the strength of market momentum based on the gains and losses over the past 14 candlesticks, is rational and is mainly used as an oscillator to determine overbought or oversold conditions. However, because the RSI is an older indicator, its very simple design—displaying only a single line on the graph—may feel somewhat lacking in functionality to modern traders. The main issue is that there is no objective measure to determine whether the RSI is currently rising or falling.
That’s when I came up with the idea of calculating the MACD based on the smoothed values of the RSI. As is well known, the MACD is an indicator that represents the distance between moving averages, designed to show when the moving averages cross as the value falls below zero. By observing the golden crosses and death crosses of the MACD and signal line, one can anticipate the golden and death crosses of the moving averages. Applying the same logic, I thought that calculating the MACD based on RSI values would allow us to predict the rise and fall of the RSI by observing these golden and death crosses.
Currently, the RSI is often used as a contrarian indicator to determine overbought and oversold conditions, but with this approach, I believe the RSI can instead function extremely well as a trend-following indicator. Whenever an uptrend occurs, the RSI inevitably rises, and when a downtrend occurs, the RSI inevitably falls. Therefore, by predicting the rise and fall of the RSI, it becomes possible to forecast what kind of trend is likely to develop.
In this indicator, the MACD calculated from the RSI is displayed, with the original RSI line plotted above it. Since the scales of the RSI and MACD are different, I originally wanted to provide a separate scale for the RSI on the left side. However, due to TradingView’s limitations, it seems quite difficult to display more than one scale in a single panel, so I had to give up on that. Instead, I ask that you mentally multiply the RSI values displayed on the right by 10—for example, 2.11 indicates 21.1%.
Additionally, as a bonus, I’ve included a feature that detects divergences. With these features, I believe this has become the most useful indicator when compared to existing RSI-based indicators. I hope you find it helpful in your trading.
Approximate Spectral Entropy-Based Market Momentum (SEMM)Overview
The Approximate Spectral Entropy-Based Market Momentum (SEMM) indicator combines the concepts of spectral entropy and traditional momentum to provide traders with insights into both the strength and the complexity of market movements. By measuring the randomness or predictability of price changes, SEMM helps traders understand whether the market is in a trending or consolidating state and how strong that trend or consolidation might be.
Key Features
Entropy Measurement: Calculates the approximate spectral entropy of price movements to quantify market randomness.
Momentum Analysis: Integrates entropy with rate-of-change (ROC) to highlight periods of strong or weak momentum.
Dynamic Market Insight: Provides a dual perspective on market behavior—both the trend strength and the underlying complexity.
Customizable Parameters: Adjustable window length for entropy calculation, allowing for fine-tuning to suit different market conditions.
Concepts Underlying the Calculations
The indicator utilizes Shannon entropy, a concept from information theory, to approximate the spectral entropy of price returns. Spectral entropy traditionally involves a Fourier Transform to analyze the frequency components of a signal, but due to Pine Script limitations, this indicator uses a simplified approach. It calculates log returns over a rolling window, normalizes them, and then computes the Shannon entropy. This entropy value represents the level of disorder or complexity in the market, which is then multiplied by traditional momentum measures like the rate of change (ROC).
How It Works
Price Returns Calculation: The indicator first computes the log returns of price data over a specified window length.
Entropy Calculation: These log returns are normalized and used to calculate the Shannon entropy, representing market complexity.
Momentum Integration: The calculated entropy is then multiplied by the rate of change (ROC) of prices to generate the SEMM value.
Signal Generation: High SEMM values indicate strong momentum with higher randomness, while low SEMM values indicate lower momentum with more predictable trends.
How Traders Can Use It
Trend Identification: Use SEMM to identify strong trends or potential trend reversals. Low entropy values can indicate a trending market, whereas high entropy suggests choppy or consolidating conditions.
Market State Analysis: Combine SEMM with other indicators or chart patterns to confirm the market's state—whether it's trending, ranging, or transitioning between states.
Risk Management: Consider high SEMM values as a signal to be cautious, as they suggest increased market unpredictability.
Example Usage Instructions
Add the Indicator: Apply the "Approximate Spectral Entropy-Based Market Momentum (SEMM)" indicator to your chart.
Adjust Parameters: Modify the length parameter to suit your trading timeframe. Shorter lengths are more responsive, while longer lengths smooth out the signal.
Analyze the Output: Observe the blue line for entropy and the red line for SEMM. Look for divergences or confirmations with price action to guide your trades.
Combine with Other Tools: Use SEMM alongside moving averages, support/resistance levels, or other indicators to build a comprehensive trading strategy.
RSI - ARIEIVhe RSI MAPPING - ARIEIV is a powerful technical indicator based on the Relative Strength Index (RSI) combined with moving averages and divergence detection. This indicator is designed to provide a clear view of overbought and oversold conditions, as well as identifying potential reversals and signals for market entries and exits.
Key Features:
Customizable RSI:
The indicator offers flexibility in adjusting the RSI length and data source (closing price, open price, etc.).
The overbought and oversold lines can be customized, allowing the RSI to signal critical market zones according to the trader’s strategy.
RSI-Based Moving Averages (MA):
Users can enable a moving average based on the RSI with support for multiple types such as SMA, EMA, WMA, VWMA, and SMMA (RMA).
For those who prefer Bollinger Bands, there’s an option to use the moving average with standard deviation to detect market volatility.
Divergence Detection:
Detects both regular and hidden divergences (bullish and bearish) between price and RSI, which can indicate potential market reversals.
These divergences can be customized with specific colors for easy identification on the chart, allowing traders to quickly spot significant market shifts.
Zone Mapping:
The script maps zones of buying and selling strength, filling the areas between the overbought and oversold levels with specific colors, highlighting when the market is in extreme conditions.
Strength Tables:
At the end of each session, a table appears on the right side of the chart, displaying the "Buying Strength" and "Selling Strength" based on calculated RSI levels. This allows for quick analysis of the dominant pressure in the market.
Flexible Settings:
Many customization options are available, from adjusting the number of decimal places to the choice of colors and the ability to toggle elements on or off within the chart.
RSI Slope Filtered Signals [UAlgo]The "RSI Slope Filtered Signals " is a technical analysis tool designed to enhance the accuracy of RSI (Relative Strength Index) signals by incorporating slope analysis. This indicator not only considers the RSI value but also analyzes the slope of the RSI over a specified number of bars, providing a more refined signal that accounts for the momentum and trend strength. By utilizing both positive and negative slope arrays, the indicator dynamically adjusts its thresholds, ensuring that signals are responsive to changing market conditions. This tool is particularly useful for traders looking to identify overbought and oversold conditions with a higher degree of precision, filtering out noise and providing clear visual cues for potential market reversals.
🔶 Key Features
Dynamic Slope Analysis: Measures the slope of RSI over a customizable number of bars, offering insights into the momentum and trend direction.
Adaptive Thresholds: Uses historical slope data to calculate dynamic thresholds, adjusting signal sensitivity based on market conditions.
Normalized Slope Calculation: Normalizes the slope values to provide a consistent measure across different market conditions, making the indicator more versatile.
Clear Signal Visualization: The indicator plots both positive and negative normalized slopes with color gradients, visually representing the strength of the trend.
Overbought and Oversold Signals: Plots overbought and oversold signals directly on the chart when the calculated value reaches the user-specified threshold, helping traders identify potential reversal points.
Customizable Settings: Allows users to adjust the RSI length, slope measurement bars, and lookback periods, providing flexibility to tailor the indicator to different trading strategies.
🔶 Interpreting the Indicator
The "RSI Slope Filtered Signals " indicator is designed to be easy to interpret. Here's how you can use it:
Normalized Slope: The indicator plots the normalized slope of the RSI, with values above zero indicating positive momentum and values below zero indicating negative momentum. A higher positive slope suggests a strong upward trend, while a deeper negative slope indicates a strong downward trend.
Reversal Signals: The indicator plots several horizontal lines at different thresholds (+3, +2, +1, 0, -1, -2, -3). These levels are used to gauge the strength of the momentum based on the normalized slope. For example, a normalized slope crossing above the +2 threshold may indicate a strong bullish trend, while crossing below the -2 threshold may suggest a strong bearish trend. These thresholds help in understanding the intensity of the current trend and provide context for interpreting the indicator's signals.
This indicator generates overbought and oversold signals not solely based on the RSI entering extreme levels (above 70 for overbought and below 30 for oversold), but also by considering the behavior of the normalized slope relative to specific thresholds. Specifically, the Overbought Signal (🔽) is triggered when the RSI is above 70 and the normalized slope from the previous bar is greater than or equal to the upper threshold, with the current slope being lower than the previous slope, indicating a potential bearish reversal as momentum may be slowing down.
Similarly, the Oversold Signal (🔼) is generated when the RSI is below 30 and the normalized slope from the previous bar is less than or equal to the lower threshold, with the current slope being higher than the previous slope, signaling a potential bullish reversal as the downward momentum may be weakening.
Area Plots: The indicator also plots the positive and negative slopes as filled areas, providing a quick visual cue for the strength and direction of the trend. Green areas represent positive slopes (upward momentum), while red areas represent negative slopes (downward momentum).
By combining these elements, the "RSI Slope Filtered Signals " provides a comprehensive view of the market's momentum, helping traders make more informed decisions by filtering out false signals and focusing on the significant trends.
🔶 Disclaimer
Use with Caution: This indicator is provided for educational and informational purposes only and should not be considered as financial advice. Users should exercise caution and perform their own analysis before making trading decisions based on the indicator's signals.
Not Financial Advice: The information provided by this indicator does not constitute financial advice, and the creator (UAlgo) shall not be held responsible for any trading losses incurred as a result of using this indicator.
Backtesting Recommended: Traders are encouraged to backtest the indicator thoroughly on historical data before using it in live trading to assess its performance and suitability for their trading strategies.
Risk Management: Trading involves inherent risks, and users should implement proper risk management strategies, including but not limited to stop-loss orders and position sizing, to mitigate potential losses.
No Guarantees: The accuracy and reliability of the indicator's signals cannot be guaranteed, as they are based on historical price data and past performance may not be indicative of future results.
Support line based on RSIThis indicator builds a support line using the stock price and RSI.
Inputs:
1. Time window for the RSI:
the time window the RSI is calculated with, usually it's 14 but in here I recommend 30.
2. offset by percentage:
just adding or subtructing some percentage of the result, some stocks need a bit of offset to work
3. stability:
the higher it is the less the RSI effects the graph. for realy high stability the indicator the the stock price will be realy close.
formula: (close*(100-newRSI)/50)*(100+offset)/100
when:
newRSI = (RSI + (50 * stability1))/(stability+1)
recommended usage:
Usually, if the indicator becomes higher than the price, (the price lowers). the stock will go up again to around the last price where they met.
so, for example, if the stock price was 20 and going down. while the indicator was 18 and going up, then they met at 19 and later the indicator became 20 while the stock fell to 18. most chances are that the stock will come back to 19 where they met and at the same time the indicator will also get to 19.
In stocks that are unstable, like NVDA. this indicator can be used to see the trend and avoid the unstability of the stock.
Average of CBO and CBO divergence histogramShort Description:
This indicator combines a Custom Bias Oscillator (CBO) with its Divergence Histogram and computes their average for use to assess the market's bias based on candlestick analysis, from the aforementioned CBO indicator.
Full Description:
Overview:
This indicator integrates two powerful analytical tools into a single script: a Custom Bias Oscillator (CBO) and its Divergence Histogram. This indicator provides traders with a comprehensive view of market bias and divergence between price movements and volume, enhanced by an optional signal line derived from the combined average of these metrics.
Key Features:
Custom Bias Oscillator (CBO):
The CBO is calculated based on the body and wick biases of candlesticks, normalized by the Average True Range (ATR) to account for market volatility.
The CBO is scaled by the divergence between the Rate of Change (ROC) of volume and the ROC of the adjusted bias, ensuring it reflects potential reversals or continuations in the market.
Divergence Histogram:
The Divergence Histogram is derived from the difference between the CBO and its signal line.
This difference is normalized and plotted to provide visual cues for potential divergences, which may indicate trend exhaustion or the beginning of a new trend.
Combined Average with Signal Line:
The indicator calculates the average of the CBO and the normalized divergence, creating a combined signal that offers a more rounded perspective on market conditions.
A signal line, generated by smoothing the combined average, is plotted to help traders identify potential buy or sell signals based on crossovers.
Customization:
The indicator includes customizable parameters for the periods of the oscillator, signal line, ATR, ROC, and the combined signal line, allowing traders to tailor the indicator to different market conditions and timeframes.
How to Use:
Buy Signal: Consider a long position when the combined average crosses above the signal line, indicating potential bullish momentum.
Sell Signal: Consider a short position when the combined average crosses below the signal line, indicating potential bearish momentum.
Divergence Analysis: Use the Divergence Histogram to identify areas where price movements may be diverging from volume, signaling potential reversals or corrections.
Disclaimer:
This indicator is designed for educational and informational purposes only. It is not financial advice. Always perform your own analysis before making any investment decisions. Past performance is not indicative of future results.
Normalized Willspread IndicatorNot sure to call it as willspread or not, because i take this idea from Larry William's original willspread indicator and did some modifications which found out to be more effective in my opinion, which is by subtracting 21 and 3 ma, this indicator is found on Trade_Stocks_and_Commodities_With_the_Insiders page155. Feel free to find out.
Here's what I modified, instead of using the subtraction between two ma, I use one ma only, I find more accurate in spotting oversold and overbought value. This indicator is useful for metals. It basically compares the value between two assets, let's say u are watching gold, u can select compare it to dxy, us30Y or gold, let's say u choose to compare to dxy, and the indicator shows the the index is overvalued which is above 80 levels, then it is suggesting that gold is overvalued, the same logic apply to undervalued as well which is 20 levels. This is not a entry or exit tool but as additional confluence, u can use any entry method u want like supply and demand and use this indicator to validate your idea, not sure whether it works on forex or not, so far i think it works well on metals.
The bar colour corresponding to the index when it is overbought or oversold. U can switch off it if you dont need it. Do note that this is a repainting indicator, so u must refer to previous week close.
EMA Crossover Buy/Sell IndicatorScript Overview
This script is a trading indicator designed to identify potential buy and sell signals based on the crossover of two Exponential Moving Averages (EMAs):
Indicator Title and Setup:
The script is named "EMA Crossover Buy/Sell Indicator" and is plotted directly on the price chart.
EMAs Calculation:
It calculates two EMAs: a 20-period EMA and a 50-period EMA. These are used to analyze the market trends over different time frames.
Plotting EMAs:
The 20-period EMA is shown on the chart in blue.
The 50-period EMA is shown in orange.
These lines help visualize the current trend and potential points of interest where the moving averages intersect.
Generating Signals:
A buy signal is triggered when the 20-period EMA crosses above the 50-period EMA.
A sell signal is triggered when the 20-period EMA crosses below the 50-period EMA.
These signals suggest potential buying or selling opportunities based on the crossover of the EMAs.
Displaying Signals:
Buy signals are marked with green labels below the bars on the chart.
Sell signals are marked with red labels above the bars on the chart.
This visual representation helps traders quickly identify potential trading opportunities.
Alerts:
Alerts are set up to notify the trader when a buy or sell signal occurs.
The alert messages specify whether the signal is a buying opportunity or a selling opportunity based on the EMA crossovers.
Altcoin Total Average Divergence (YavuzAkbay)The "Average Price and Divergence" indicator is a strong tool built exclusively for cryptocurrency traders who understand the significance of comparing altcoins to Bitcoin (BTC). While traditional research frequently focusses on the value of cryptocurrencies against fiat currencies such as the US dollar, this indicator switches the focus to the value of altcoins against Bitcoin itself, allowing you to detect potential market opportunities and divergences.
The indicator allows you to compare the price of an altcoin to Bitcoin (e.g., ETHBTC, SOLBTC), which is critical for determining how well an altcoin performs against the main cryptocurrency. This is especially important for investors who expect Bitcoin's price will continue to rise logarithmically and want to ensure that their altcoin holdings retain or expand in market capitalisation compared to Bitcoin.
The indicator computes the average price of the chosen cryptocurrency relative to Bitcoin over the viewable portion of the chart. This average acts as a benchmark, indicating the normal value around which the altcoin's price moves.
The primary objective of this indicator is to calculate and plot the divergence, which is the difference between the altcoin's current price relative to Bitcoin and its average value. This divergence can reveal probable overbought or oversold conditions, allowing traders to make better decisions about entry and exit points.
The divergence is represented as a histogram, with bars representing the magnitude of the difference between the current and average prices. Positive values indicate that the altcoin is trading above its average value in comparison to Bitcoin, whereas negative values indicate that it is trading below its average.
The indicator automatically adjusts to the chart's visible range, ensuring that the average price and divergence are always calculated using the most relevant data. This makes the indicator extremely sensitive to changes in the chart view and market conditions.
How to Use:
A significant positive divergence may imply that the cryptocurrency is overbought in comparison to Bitcoin and is headed for a correction. A significant negative divergence, on the other hand, may indicate that the cryptocurrency has been oversold and is cheap in comparison to Bitcoin.
Tracking how an altcoin's price deviates from its average relative to Bitcoin can provide insights about the market's opinion towards that altcoin. Persistent positive divergence may suggest high market confidence, whilst constant negative divergence may imply a lack of interest or eroding fundamentals.
Use divergence data to better time your trades, either by entering when a cryptocurrency is discounted in comparison to its average (negative divergence) or departing when it is overpriced (positive divergence). This allows you to capture value as the price returns to its mean.
Ideal For:
Cryptocurrency Traders who want to understand how altcoins are performing relative to Bitcoin rather than just against fiat currencies.
Long-term Investors looking to ensure their altcoin investments are maintaining or growing their value relative to Bitcoin.
Market Analysts interested in identifying potential reversals or continuations in altcoin prices based on divergence from their average value relative to Bitcoin.
MACD with 1D Stochastic Confirmation Reversal StrategyOverview
The MACD with 1D Stochastic Confirmation Reversal Strategy utilizes MACD indicator in conjunction with 1 day timeframe Stochastic indicators to obtain the high probability short-term trend reversal signals. The main idea is to wait until MACD line crosses up it’s signal line, at the same time Stochastic indicator on 1D time frame shall show the uptrend (will be discussed in methodology) and not to be in the oversold territory. Strategy works on time frames from 30 min to 4 hours and opens only long trades.
Unique Features
Dynamic stop-loss system: Instead of fixed stop-loss level strategy utilizes average true range (ATR) multiplied by user given number subtracted from the position entry price as a dynamic stop loss level.
Configurable Trading Periods: Users can tailor the strategy to specific market windows, adapting to different market conditions.
Higher time frame confirmation: Strategy utilizes 1D Stochastic to establish the major trend and confirm the local reversals with the higher probability.
Trailing take profit level: After reaching the trailing profit activation level scrip activate the trailing of long trade using EMA. More information in methodology.
Methodology
The strategy opens long trade when the following price met the conditions:
MACD line of MACD indicator shall cross over the signal line of MACD indicator.
1D time frame Stochastic’s K line shall be above the D line.
1D time frame Stochastic’s K line value shall be below 80 (not overbought)
When long trade is executed, strategy set the stop-loss level at the price ATR multiplied by user-given value below the entry price. This level is recalculated on every next candle close, adjusting to the current market volatility.
At the same time strategy set up the trailing stop validation level. When the price crosses the level equals entry price plus ATR multiplied by user-given value script starts to trail the price with EMA. If price closes below EMA long trade is closed. When the trailing starts, script prints the label “Trailing Activated”.
Strategy settings
In the inputs window user can setup the following strategy settings:
ATR Stop Loss (by default = 3.25, value multiplied by ATR to be subtracted from position entry price to setup stop loss)
ATR Trailing Profit Activation Level (by default = 4.25, value multiplied by ATR to be added to position entry price to setup trailing profit activation level)
Trailing EMA Length (by default = 20, period for EMA, when price reached trailing profit activation level EMA will stop out of position if price closes below it)
User can choose the optimal parameters during backtesting on certain price chart, in our example we use default settings.
Justification of Methodology
This strategy leverages 2 time frames analysis to have the high probability reversal setups on lower time frame in the direction of the 1D time frame trend. That’s why it’s recommended to use this strategy on 30 min – 4 hours time frames.
To have an approximation of 1D time frame trend strategy utilizes classical Stochastic indicator. The Stochastic Indicator is a momentum oscillator that compares a security's closing price to its price range over a specific period. It's used to identify overbought and oversold conditions. The indicator ranges from 0 to 100, with readings above 80 indicating overbought conditions and readings below 20 indicating oversold conditions.
It consists of two lines:
%K: The main line, calculated using the formula (CurrentClose−LowestLow)/(HighestHigh−LowestLow)×100 . Highest and lowest price taken for 14 periods.
%D: A smoothed moving average of %K, often used as a signal line.
Strategy logic assumes that on 1D time frame it’s uptrend in %K line is above the %D line. Moreover, we can consider long trade only in %K line is below 80. It means that in overbought state the long trade will not be opened due to higher probability of pullback or even major trend reversal. If these conditions are met we are going to our working (lower) time frame.
On the chosen time frame, we remind you that for correct work of this strategy you shall use 30min – 4h time frames, MACD line shall cross over it’s signal line. The MACD (Moving Average Convergence Divergence) is a popular momentum and trend-following indicator used in technical analysis. It helps traders identify changes in the strength, direction, momentum, and duration of a trend in a stock's price.
The MACD consists of three components:
MACD Line: This is the difference between a short-term Exponential Moving Average (EMA) and a long-term EMA, typically calculated as: MACD Line=12-period EMA−26-period
Signal Line: This is a 9-period EMA of the MACD Line, which helps to identify buy or sell signals. When the MACD Line crosses above the Signal Line, it can be a bullish signal (suggesting a buy); when it crosses below, it can be a bearish signal (suggesting a sell).
Histogram: The histogram shows the difference between the MACD Line and the Signal Line, visually representing the momentum of the trend. Positive histogram values indicate increasing bullish momentum, while negative values indicate increasing bearish momentum.
In our script we are interested in only MACD and signal lines. When MACD line crosses signal line there is a high chance that short-term trend reversed to the upside. We use this strategy on 45 min time frame.
ATR is used to adjust the strategy risk management to the current market volatility. If volatility is low, we don’t need the large stop loss to understand the there is a high probability that we made a mistake opening the trade. User can setup the settings ATR Stop Loss and ATR Trailing Profit Activation Level to realize his own risk to reward preferences, but the unique feature of a strategy is that after reaching trailing profit activation level strategy is trying to follow the trend until it is likely to be finished instead of using fixed risk management settings. It allows sometimes to be involved in the large movements.
Backtest Results
Operating window: Date range of backtests is 2023.01.01 - 2024.08.01. It is chosen to let the strategy to close all opened positions.
Commission and Slippage: Includes a standard Binance commission of 0.1% and accounts for possible slippage over 5 ticks.
Initial capital: 10000 USDT
Percent of capital used in every trade: 30%
Maximum Single Position Loss: -4.79%
Maximum Single Profit: +20.14%
Net Profit: +2361.33 USDT (+44.72%)
Total Trades: 123 (44.72% win rate)
Profit Factor: 1.623
Maximum Accumulated Loss: 695.80 USDT (-5.48%)
Average Profit per Trade: 19.20 USDT (+0.59%)
Average Trade Duration: 30 hours
These results are obtained with realistic parameters representing trading conditions observed at major exchanges such as Binance and with realistic trading portfolio usage parameters.
How to Use
Add the script to favorites for easy access.
Apply to the desired timeframe between 30 min and 4 hours and chart (optimal performance observed on 45 min BTC/USDT).
Configure settings using the dropdown choice list in the built-in menu.
Set up alerts to automate strategy positions through web hook with the text: {{strategy.order.alert_message}}
Disclaimer:
Educational and informational tool reflecting Skyrex commitment to informed trading. Past performance does not guarantee future results. Test strategies in a simulated environment before live implementation
Price Oscillator TR### Summary: How to Use the Price Oscillator with EMA Indicator
The **Price Oscillator with EMA** is a custom technical analysis tool designed to help traders identify potential buying and selling opportunities based on price momentum. Here's how to use it:
1. **Understanding the Oscillator**:
- The oscillator is calculated by normalizing the current price relative to the highest high and lowest low over a specified lookback period. It fluctuates between -70 and +70.
- When the oscillator is near +70, the price is close to the recent highs, indicating potential overbought conditions. Conversely, when it’s near -100, the price is close to recent lows, indicating potential oversold conditions.
2. **Exponential Moving Average (EMA)**:
- The indicator includes an EMA of the oscillator to smooth out price fluctuations and provide a clearer signal.
- The EMA helps to filter out noise and confirm trends.
3. **Trading Signals**:
- **Bullish Signal**: A potential buying opportunity is signaled when the oscillator crosses above its EMA. This suggests increasing upward momentum.
- **Bearish Signal**: A potential selling opportunity is signaled when the oscillator crosses below its EMA. This indicates increasing downward momentum.
4. **Visual Aids**:
- The indicator includes horizontal lines at +70, 0, and -70 to help you quickly assess overbought, neutral, and oversold conditions.
- The blue line represents the oscillator, while the orange line represents the EMA of the oscillator.
### How to Use:
- **Set your parameters**: Adjust the lookback period and EMA length to fit your trading strategy and time frame.
- **Watch for Crossovers**: Monitor when the oscillator crosses the EMA. A crossover from below to above suggests a buy, while a crossunder from above to below suggests a sell.
- **Confirm with Other Indicators**: For more reliable signals, consider using this indicator alongside other technical tools like volume analysis, trend lines, or support/resistance levels.
This indicator is ideal for traders looking to capture momentum-based trades in various market conditions.
MACD Trail | Flux Charts💎 GENERAL OVERVIEW
Introducing our new MACD Trail indicator! Moving average convergence/divergence (MACD) is a well-known indicator among traders. It's a trend-following indicator that uses the relationship between two exponential moving averages (EMAs). This indicator aims to use MACD to generate a trail that follows the current price of the ticker, which can act as a support / resistance zone. More info about the process in the "How Does It Work" section.
Features of the new MACD Trail Indicator :
A Trail Generated Using MACD Calculation
Customizable Algorithm
Customizable Styling
📌 HOW DOES IT WORK ?
First of all, this indicator calculates the current MACD of the ticker using the user's input as settings. Let X = MACD Length setting ;
MACD ~= X Period EMA - (X * 2) Period EMA
Then, two MACD Trails are generated, one being bullish and other being bearish. Let ATR = 30 period ATR (Average True Range)
Bullish MACD Trail = Current Price + MACD - (ATR * 1.75)
Bearish MACD Trail = Current Price + MACD + (ATR * 1.75)
The indicator starts by rendering only the Bullish MACD Trail. Then if it's invalidated (candlestick closes below the trail) it switches to Bearish MACD Trail. The MACD trail switches between bullish & bearish as they get invalidated.
The trail type may give a hint about the current trend of the price action. The trail itself also can act as a support / resistance zone, here is an example :
🚩 UNIQUENESS
While MACD is one of the most used indicators among traders, this indicator aims to add another functionality to it by rendering a trail based on it. This trail may act as a support / resistance zone as described above, and gives a glimpse about the current trend. The indicator also has custom MACD Length and smoothing options, as well as various style options.
⚙️ SETTINGS
1. General Configuration
MACD Length -> This setting adjusts the EMA periods used in MACD calculation. Increasing this setting will make MACD more responseive to longer trends, while decreasing it may help with detection of shorter trends.
Smoothing -> The smoothing of the MACD Trail. Increasing this setting will help smoothen out the MACD Trail line, but it can also make it less responsive to the latest changes.
Moments Functions
This script is a TradingView Pine Script (version 5) for calculating and plotting statistical moments of a financial series. Here's a breakdown of what it does:
Script Overview
Purpose:
The script calculates and visualizes moments such as Mean, Variance, Skewness, and Kurtosis of a price series.
It also provides the option to display log returns and various statistical bands.
Inputs:
Moments Selection: Choose from Mean, Variance, Skewness, or Excess Kurtosis.
Source Settings: Define the lookback period and source data (e.g., closing price or log returns).
Plot Settings: Control visibility and styling of plots, bands, and information panels.
Colors Settings: Customize colors for different plot elements.
Functions:
f_va(): Computes sample variance.
f_sd(): Computes sample standard deviation.
f_skew(): Computes sample skewness.
f_kurt(): Computes sample kurtosis.
seskew(): Calculates the standard error of skewness.
sekurt(): Calculates the standard error of kurtosis.
skewcv(): Computes critical values for skewness.
kurtcv(): Computes critical values for kurtosis.
Outputs:
Plots:
Moment values (Mean, Variance, Skewness, Kurtosis).
Log Returns (if selected).
Standard Deviation Bands (if selected).
Critical Values for Skewness and Kurtosis (if selected).
Information Panel: Displays current statistical values and their significance.
Customization:
Users can customize appearance and behavior of the script through various input options, including colors, line thickness, and background settings.
Key Variables and Constants
Constants:
zscoreS and zscoreL: Z-scores for confidence intervals based on sample size.
skewrv and kurtrv: Reference values for skewness and excess kurtosis.
Sample Functions:
f_va() and f_sd(): Custom functions to calculate sample variance and standard deviation.
f_skew() and f_kurt(): Custom functions to calculate skewness and kurtosis.
Critical Values:
Functions skewcv() and kurtcv() calculate critical values used to assess statistical significance of skewness and kurtosis.
Plotting
Plot Types:
Mean, variance, skewness, and excess kurtosis are plotted based on user selection.
Log returns are plotted if enabled.
Standard deviation bands and critical values are plotted if enabled.
Labels:
Information panel labels display mean, variance/standard deviation, skewness, and kurtosis values along with their significance.
Example Usage
To use this script:
Add it to a TradingView chart.
Adjust inputs to configure which statistical moments to display, the source data, and the appearance of the plots.
Review the plotted data and labels to analyze the statistical properties of the selected price series.
This script is useful for traders and analysts looking to perform advanced statistical analysis on financial data directly within TradingView.
When comparing two stock prices over a period of time, the statistical moments—mean, variance, skewness, and kurtosis—can provide a deep insight into the behavior of the stock prices and their distributions. Here’s what each moment signifies in this context:
1. Mean
Definition: The mean (or average) is the sum of the stock prices over the period divided by the number of data points. It represents the central value of the price series.
Interpretation: When comparing two stocks, the mean tells you the average price level of each stock over the period. A higher mean indicates that, on average, the stock price is higher compared to another stock with a lower mean.
Comparison Insight: If Stock A has a higher mean price than Stock B, it implies that Stock A's prices are generally higher than those of Stock B over the given period.
2. Variance
Definition: Variance measures the dispersion or spread of the stock prices around the mean. It is the average of the squared differences from the mean.
Interpretation: A higher variance indicates that the stock prices fluctuate more widely from the mean, implying greater volatility. Conversely, a lower variance indicates more stable and predictable prices.
Comparison Insight: Comparing the variances of two stocks helps in assessing which stock has more price volatility. If Stock A has a higher variance than Stock B, it means Stock A's prices are more volatile and less predictable compared to Stock B.
3. Skewness
Definition: Skewness measures the asymmetry of the distribution of stock prices around the mean. It can be positive, negative, or zero:
Positive Skewness: The distribution has a long right tail, with more frequent small returns and fewer large positive returns.
Negative Skewness: The distribution has a long left tail, with more frequent small returns and fewer large negative returns.
Zero Skewness: The distribution is symmetric around the mean.
Interpretation: Skewness tells you about the direction of outliers in the stock price distribution. Positive skewness means a higher probability of large positive returns, while negative skewness means a higher probability of large negative returns.
Comparison Insight: By comparing skewness, you can understand the nature of extreme returns for two stocks. For example, if Stock A has positive skewness and Stock B has negative skewness, Stock A might have more frequent large gains, whereas Stock B might have more frequent large losses.
4. Kurtosis
Definition: Kurtosis measures the "tailedness" of the distribution of stock prices. It indicates how much of the distribution is in the tails versus the center. High kurtosis means more outliers (extreme returns), while low kurtosis means fewer outliers.
Interpretation:
High Kurtosis: Indicates a higher likelihood of extreme price movements (both high and low) compared to a normal distribution.
Low Kurtosis: Indicates that extreme price movements are less common.
Comparison Insight: Comparing kurtosis between two stocks shows which stock has more extreme returns. If Stock A has higher kurtosis than Stock B, it means Stock A has more frequent extreme price changes, suggesting more risk or opportunities for large gains or losses.
Summary
Mean: Compares average price levels.
Variance: Compares price volatility.
Skewness: Compares the asymmetry of price movements.
Kurtosis: Compares the likelihood of extreme price changes.
By analyzing these statistical moments, you can gain a comprehensive view of how the two stocks behave relative to each other, which can inform investment decisions based on risk, return expectations, and the nature of price movements.
Gabriel's Relative Unrealized Profit with Dynamic MVRV Histogram
Certainly! Here’s an enhanced description of the Gabriel's Relative Unrealized Profit with Dynamic MVRV Histogram indicator with detailed usage instructions and explanations of why it's effective:
Gabriel's Relative Unrealized Profit with Dynamic MVRV Histogram
Description:
The Gabriel's Relative Unrealized Profit with Dynamic MVRV Histogram is an advanced trading indicator designed to offer in-depth insights into asset profitability and market valuation. By integrating Relative Unrealized Profit (RUP) and the Market Value to Realized Value (MVRV) Ratio, this indicator provides a nuanced view of an asset's performance and potential trading signals.
Key Components:
SMA Length and Volume Indicator:
SMA Length: Defines the period for the Simple Moving Average (SMA) used to calculate the entry price, defaulted to 14 periods. This smoothing technique helps estimate the average historical price at which the asset was acquired.
Volume Indicator: Allows selection between "volume" and "vwap" (Volume-Weighted Average Price) for calculating entry volume. The choice impacts the calculation of entry volume, either based on standard trading volume or a weighted average price.
Realized Price Calculation:
Computes the average price over a specified period (default of 30 periods) to establish the realized price. This serves as a benchmark for evaluating the cost basis of the asset.
MVRV Calculation:
Current Price: The most recent closing price of the asset, representing its market value.
Total Cost: Calculated as the product of the entry price and entry volume, reflecting the total investment made.
Unrealized Profit: The difference between the current price and the entry price, multiplied by entry volume, indicating profit or loss that has yet to be realized.
Relative Unrealized Profit: Expressed as a percentage of the total cost, showing how much profit or loss exists relative to the initial investment.
Market Value and Realized Value: Market Value is the current price multiplied by entry volume, while Realized Value is the realized price multiplied by entry volume. The MVRV Ratio is obtained by dividing Market Value by Realized Value.
Normalization:
Normalizes both Relative Unrealized Profit and MVRV Ratio to a standardized range of -100 to 100. This involves calculating the minimum and maximum values over a 100-period window to ensure comparability and relevance.
Histogram Calculation:
The histogram is derived from the difference between the normalized Relative Unrealized Profit and the normalized MVRV Ratio. It visually represents the disparity between the two metrics, highlighting potential trading signals.
Plotting and Alerts:
Plots:
Normalized Relative Unrealized Profit (Blue Line): Plotted in blue, this line shows the scaled measure of unrealized profit. Positive values indicate potential gains, while negative values suggest potential losses.
Normalized MVRV Ratio (Red Line): Plotted in red, this line represents the scaled MVRV Ratio. Higher values suggest that the asset’s market value significantly exceeds its realized value, indicating potential overvaluation, while lower values suggest potential undervaluation.
Histogram (Green Bars): Plotted in green, this histogram displays the difference between the normalized Relative Unrealized Profit and the normalized MVRV Ratio. Positive bars indicate that the asset’s profitability is exceeding its market valuation, while negative bars suggest the opposite.
Alerts:
High Histogram Alert: Activated when the histogram value exceeds 50. This condition signals a strong positive divergence, indicating that the asset's profitability is outperforming its market valuation. It may suggest a buying opportunity or indicate that the asset is undervalued relative to its potential profitability.
Low Histogram Alert: Triggered when the histogram value falls below -50. This condition signals a strong negative divergence, indicating that the asset's profitability is lagging behind its market valuation. It may suggest a selling opportunity or indicate that the asset is overvalued relative to its profitability.
How to Use the Indicator:
Setup: Customize the SMA Length, Volume Indicator, and Realized Price Length based on your trading strategy and asset volatility. These parameters allow you to tailor the indicator to different market conditions and asset types.
Interpretation:
Blue Line (Normalized Relative Unrealized Profit): Monitor this line to gauge the profitability of holding the asset. Significant positive values suggest that the asset is currently in a profitable position relative to its purchase price.
Red Line (Normalized MVRV Ratio): Use this line to assess whether the asset is trading at a premium or discount relative to its cost basis. Higher values may indicate overvaluation, while lower values suggest undervaluation.
Green Bars (Histogram): Observe the histogram for deviations between RUP and MVRV Ratio. Large positive bars indicate that the asset's profitability is strong relative to its valuation, signaling potential buying opportunities. Large negative bars suggest that the asset's profitability is weak relative to its valuation, signaling potential selling opportunities.
Trading Strategy:
Bullish Conditions: When the histogram shows large positive values, it suggests that the asset’s profitability is strong compared to its valuation. Consider this as a potential buying signal, especially if the histogram remains consistently positive.
Bearish Conditions: When the histogram displays large negative values, it indicates that the asset’s profitability is weak compared to its valuation. This may signal a potential selling opportunity or caution, particularly if the histogram remains consistently negative.
Why This Indicator is Effective:
Integrated Metrics: Combining Relative Unrealized Profit and MVRV Ratio provides a comprehensive view of asset performance. This integration allows traders to evaluate both profitability and market valuation in one cohesive tool.
TICK Price Label Colors[Salty]The ticker symbol for the NYSE CUMULATIVE Tick Index is TICK. The Tick Index is a short-term indicator that shows the number of stocks trading up minus the number of stocks trading down. Traders can use this ratio to make quick trading decisions based on market movement. For example, a positive tick index can indicate market optimism, while readings of +1,000 and -1,000 can indicate overbought or oversold conditions.
This script is used to color code the price label of the Symbol values zero or above in Green(default), and values below zero in red(default). For a dynamic symbol like the TICK this tells me the market is bullish when Green or Bearish when Red. I was previously using the baseline style with a Base level of 50 to accomplish this view of the symbol, but it was always difficult to maintain the zero level at the zero TICK value. This indicator is always able to color code the price label properly. Also, it has the benefit of setting the timeframe to 1 second(default) that is maintained even when the chart timeframe is changed.
Update: Added the ability to show the TICK Symbol to support viewing multiple TICK tickers at once as shown.
Trend Strength | Flux Charts💎 GENERAL OVERVIEW
Introducing the new Trend Strength indicator! Latest trends and their strengths play an important role for traders. This indicator aims to make trend and strength detection much easier by coloring candlesticks based on the current strength of trend. More info about the process in the "How Does It Work" section.
Features of the new Trend Strength Indicator :
3 Trend Detection Algorithms Combined (RSI, Supertrend & EMA Cross)
Fully Customizable Algorithm
Strength Labels
Customizable Colors For Bullish, Neutral & Bearish Trends
📌 HOW DOES IT WORK ?
This indicator uses three different methods of trend detection and combines them all into one value. First, the RSI is calculated. The RSI outputs a value between 0 & 100, which this indicator maps into -100 <-> 100. Let this value be named RSI. Then, the Supertrend is calculated. Let SPR be -1 if the calculated Supertrend is bearish, and 1 if it's bullish. After that, latest EMA Cross is calculated. This is done by checking the distance between the two EMA's adjusted by the user. Let EMADiff = EMA1 - EMA2. Then EMADiff is mapped from -ATR * 2 <-> ATR * 2 to -100 <-> 100.
Then a Total Strength (TS) is calculated by given formula : RSI * 0.5 + SPR * 0.2 + EMADiff * 0.3
The TS value is between -100 <-> 100, -100 being fully bearish, 0 being true neutral and 100 being fully bullish.
Then the Total Strength is converted into a color adjusted by the user. The candlesticks in the chart will be presented with the calculated color.
If the Labels setting is enabled, each time the trend changes direction a label will appear indicating the new direction. The latest candlestick will always show the current trend with a label.
EMA = Exponential Moving Average
RSI = Relative Strength Index
ATR = Average True Range
🚩 UNIQUENESS
The main point that differentiates this indicator from others is it's simplicity and customization options. The indicator interprets trend and strength detection in it's own way, combining 3 different well-known trend detection methods: RSI, Supertrend & EMA Cross into one simple method. The algorithm is fully customizable and all styling options are adjustable for the user's liking.
⚙️ SETTINGS
1. General Configuration
Detection Length -> This setting determines the amount of candlesticks the indicator will look for trend detection. Higher settings may help the indicator find longer trends, while lower settings will help with finding smaller trends.
Smoothing -> Higher settings will result in longer periods of time required for trend to change direction from bullish to bearish and vice versa.
EMA Lengths -> You can enter two EMA Lengths here, the second one must be longer than the first one. When the shorter one crosses under the longer one, this will be a bearish sign, and if it crosses above it will be a bullish sign for the indicator.
Labels -> Enables / Disables trend strength labels.
DSL Oscillator [BigBeluga]DSL Oscillator BigBeluga
The DSL (Discontinued Signal Lines) Oscillator is an advanced technical analysis tool that combines elements of the Relative Strength Index (RSI), Discontinued Signal Lines, and Zero-Lag Exponential Moving Average (ZLEMA). This versatile indicator is designed to help traders identify trend direction, momentum, and potential reversal points in the market.
What are Discontinued Signal Lines (DSL)?
Discontinued Signal Lines are an extension of the traditional signal line concept used in many indicators. While a standard signal line compares an indicator's value to its smoothed (slightly lagging) state, DSL takes this idea further by using multiple adaptive lines that respond to the indicator's current value. This approach provides a more nuanced view of the indicator's state and momentum, making it easier to determine trends and desired states of the indicator.
🔵 KEY FEATURES
● Discontinued Signal Lines (DSL)
Uses multiple adaptive lines that respond to the indicator's value
Provides a more nuanced view of the indicator's state and momentum
Helps determine trends and desired states of the indicator more effectively
Available in "Fast" and "Slow" modes for different responsiveness
Acts as dynamic support and resistance levels for the oscillator
● DSL Oscillator
Based on a combination of RSI and Discontinued Signal Lines
// Discontinued Signal Lines
dsl_lines(src, length)=>
UP = 0.
DN = 0.
UP := (src > ta.sma(src, length)) ? nz(UP ) + dsl_mode / length * (src - nz(UP )) : nz(UP )
DN := (src < ta.sma(src, length)) ? nz(DN ) + dsl_mode / length * (src - nz(DN )) : nz(DN )
Smoothed using Zero-Lag Exponential Moving Average for reduced lag
// Zero-Lag Exponential Moving Average function
zlema(src, length) =>
lag = math.floor((length - 1) / 2)
ema_data = 2 * src - src
ema2 = ta.ema(ema_data, length)
ema2
Oscillates between 0 and 100
Color-coded for easy interpretation of market conditions
● Signal Generation
Generates buy signals when the oscillator crosses above the lower DSL line below 50
Generates sell signals when the oscillator crosses below the upper DSL line above 50
Signals are visualized on both the oscillator and the main chart
● Visual Cues
Background color changes on signal occurrences for easy identification
Candles on the main chart are colored based on the latest signal
Oscillator line color changes based on its position relative to the DSL lines
🔵 HOW TO USE
● Trend Identification
Use the color and position of the DSL Oscillator relative to its Discontinued Signal Lines to determine the overall market trend
● Entry Signals
Look for buy signals (green circles) when the oscillator crosses above the lower DSL line
Look for sell signals (blue circles) when the oscillator crosses below the upper DSL line
Confirm signals with the triangles on the main chart and background color changes
● Exit Signals
Consider exiting long positions on exit signals and short positions on Entery signals
Watch for the oscillator crossing back between the DSL lines as a potential early exit signal
● Momentum Analysis
Strong momentum is indicated when the oscillator moves rapidly towards extremes and away from the DSL lines
Weakening momentum can be spotted when the oscillator struggles to reach new highs or lows, or starts converging with the DSL lines
The space between the DSL lines can indicate potential momentum strength - wider gaps suggest stronger trends
● Confirmation
Use the DSL lines as dynamic support/resistance levels for the oscillator
Look for convergence between oscillator signals and price action on the main chart
Combine signals with other technical indicators or chart patterns for stronger confirmation
🔵 CUSTOMIZATION
The DSL Oscillator offers several customization options:
Adjust the main calculation length for the DSL lines
Choose between "Fast" and "Slow" modes for the DSL lines calculation
By fine-tuning these settings, traders can adapt the DSL Oscillator to various market conditions and personal trading strategies.
The DSL Oscillator provides a multi-faceted approach to market analysis, combining trend identification, momentum assessment, and signal generation in one comprehensive tool. Its dynamic nature and visual cues make it suitable for both novice and experienced traders across various timeframes and markets. The integration of RSI, Discontinued Signal Lines, and ZLEMA offers traders a sophisticated yet intuitive tool to inform their trading decisions.
The use of Discontinued Signal Lines sets this oscillator apart from traditional indicators by providing a more adaptive and nuanced view of market conditions. This can potentially lead to more accurate trend identification and signal generation, especially in markets with varying volatility.
Traders can use the DSL Oscillator to identify trends, spot potential reversals, and gauge market momentum. The combination of the oscillator, dynamic signal lines, and clear visual signals provides a holistic view of market conditions. As with all technical indicators, it's recommended to use the DSL Oscillator in conjunction with other forms of analysis and within the context of a well-defined trading strategy.
Supply and Demand Zones with Enhanced SignalsThis Pine Script indicator combines supply and demand zone analysis with dynamic buy/sell signals to enhance trading strategies. It provides a robust framework for identifying optimal trading opportunities and managing existing trades.
Key Features:
Supply and Demand Zones: The indicator identifies significant supply and demand zones based on recent price action. These zones are plotted as horizontal lines to help traders visualize potential reversal points.
Exponential Moving Average (EMA): A 21-period EMA is used to determine the prevailing trend and generate buy and sell signals.
Relative Strength Index (RSI): The 14-period RSI is utilized to filter buy and sell signals, providing additional context on overbought and oversold conditions.
Signal Generation:
Buy Signal: Triggered when the price crosses above the EMA and RSI indicates that the market is not overbought.
Sell Signal: Triggered when the price crosses below the EMA and RSI indicates that the market is not oversold.
Enhanced Exit Signals:
Exit Buy Signal: Generated if an opposite sell signal occurs or the higher timeframe RSI indicates overbought conditions.
Exit Sell Signal: Generated if an opposite buy signal occurs or the higher timeframe RSI indicates oversold conditions.
Trade Management:
Tracks active trades and provides exit signals based on the occurrence of opposite trading signals. This helps in managing positions more effectively and reducing potential losses.
Usage:
Supply and Demand Zones: Look for price action around these zones to identify potential trading opportunities.
EMA and RSI: Use buy and sell signals in conjunction with EMA and RSI to validate trading decisions.
Higher Timeframe RSI: Utilize this for additional confirmation and exit signals.
Plotting:
Supply Zone: Plotted as a red horizontal line.
Demand Zone: Plotted as a green horizontal line.
EMA: Plotted as a blue line.
Buy and Sell Signals: Indicated by green and red triangle shapes, respectively.
Exit Signals: Indicated by blue and orange X shapes.
This indicator is designed to help traders make informed decisions by combining technical analysis with strategic trade management.
WaveTrend With Divs & RSI(STOCH) Divs by WeloTradesWaveTrend with Divergences & RSI(STOCH) Divergences by WeloTrades
Overview
The "WaveTrend With Divergences & RSI(STOCH) Divergences" is an advanced Pine Script™ indicator designed for TradingView, offering a multi-dimensional analysis of market conditions. This script integrates several technical indicators—WaveTrend, Money Flow Index (MFI), RSI, and Stochastic RSI—into a cohesive tool that identifies both regular and hidden divergences across these indicators. These divergences can indicate potential market reversals and provide critical trading opportunities.
This indicator is not just a simple combination of popular tools; it offers extensive customization options, organized data presentation, and valuable trading signals that are easy to interpret. Whether you're a day trader or a long-term investor, this script enhances your ability to make informed decisions.
Originality and Usefulness
The originality of this script lies in its integration and the synergy it creates among the indicators used. Rather than merely combining multiple indicators, this script allows them to work together, enhancing each other's strengths. For example, by identifying divergences across WaveTrend, RSI, and Stochastic RSI simultaneously, the script provides multiple layers of confirmation, which reduces the likelihood of false signals and increases the reliability of trading signals.
The usefulness of this script is apparent in its ability to offer a consolidated view of market dynamics. It not only simplifies the analytical process by combining different indicators but also provides deeper insights through its divergence detection features. This comprehensive approach is designed to help traders identify potential market reversals, confirm trends, and ultimately make more informed trading decisions.
How the Components Work Together
1. Cross-Validation of Signals
WaveTrend: This indicator is primarily used to identify overbought and oversold conditions, as well as potential buy and sell signals. WaveTrend's ability to smooth price data and reduce noise makes it a reliable tool for identifying trend reversals.
RSI & Stochastic RSI: These momentum oscillators are used to measure the speed and change of price movements. While RSI identifies general overbought and oversold conditions, Stochastic RSI offers a more granular view by tracking the RSI’s level relative to its high-low range over a period of time. When these indicators align with WaveTrend signals, it adds a layer of confirmation that enhances the reliability of the signals.
Money Flow Index (MFI): This volume-weighted indicator assesses the inflow and outflow of money in an asset, giving insights into buying and selling pressure. By analyzing the MFI alongside WaveTrend and RSI indicators, the script can cross-validate signals, ensuring that buy or sell signals are supported by actual market volume.
Example Bullish scenario:
When a bullish divergence is detected on the RSI and confirmed by a corresponding bullish signal on the WaveTrend, along with an increasing Money Flow Index, the probability of a successful trade setup increases. This cross-validation minimizes the risk of acting on false signals, which might occur when relying on a single indicator.
Example Bearish scenario:
When a bearish divergence is detected on the RSI and confirmed by a corresponding bearish signal on the WaveTrend, along with an decreasing Money Flow Index, the probability of a successful trade setup increases. This cross-validation minimizes the risk of acting on false signals, which might occur when relying on a single indicator.
2. Divergence Detection and Market Reversals
Regular Divergences: Occur when the price action and an indicator (like RSI or WaveTrend) move in opposite directions. Regular bullish divergence signals a potential upward reversal when the price makes a lower low while the indicator makes a higher low. Conversely, regular bearish divergence suggests a downward reversal when the price makes a higher high, but the indicator makes a lower high.
Hidden Divergences: These occur when the price action and indicator move in the same direction, but with different momentum. Hidden bullish divergence suggests the continuation of an uptrend, while hidden bearish divergence suggests the continuation of a downtrend. By detecting these divergences across multiple indicators, the script identifies potential trend reversals or continuations with greater accuracy.
Example: The script might detect a regular bullish divergence on the WaveTrend while simultaneously identifying a hidden bullish divergence on the RSI. This combination suggests that while a trend reversal is possible, the overall market sentiment remains bullish, providing a nuanced view of the market.
A Regular Bullish Divergence Example:
A Hidden Bullish Divergence Example:
A Regular Bearish Divergence Example:
A Hidden Bearish Divergence Example:
3. Trend Strength and Sentiment Analysis
WaveTrend: Measures the strength and direction of the trend. By identifying the extremes of market sentiment (overbought and oversold levels), WaveTrend provides early signals for potential reversals.
Money Flow Index (MFI): Assesses the underlying sentiment by analyzing the flow of money. A rising MFI during an uptrend confirms strong buying pressure, while a falling MFI during a downtrend confirms selling pressure. This helps traders assess whether a trend is likely to continue or reverse.
RSI & Stochastic RSI: Offer a momentum-based perspective on the trend’s strength. High RSI or Stochastic RSI values indicate that the asset may be overbought, suggesting a potential reversal. Conversely, low values indicate oversold conditions, signaling a possible upward reversal.
Example:
During a strong uptrend, the WaveTrend & RSI's might signal overbought conditions, suggesting caution. If the MFI also shows decreasing buying pressure and the RSI reaches extreme levels, these indicators together suggest that the trend might be weakening, and a reversal could be imminent.
Example:
During a strong downtrend, the WaveTrend & RSI's might signal oversold conditions, suggesting caution. If the MFI also shows increasing buying pressure and the RSI reaches extreme levels, these indicators together suggest that the trend might be weakening, and a reversal could be imminent.
Conclusion
The "WaveTrend With Divergences & RSI(STOCH) Divergences" script offers a powerful, integrated approach to technical analysis by combining trend, momentum, and sentiment indicators into a single tool. Its unique value lies in the cross-validation of signals, the ability to detect divergences, and the comprehensive view it provides of market conditions. By offering traders multiple layers of analysis and customization options, this script is designed to enhance trading decisions, reduce false signals, and provide clearer insights into market dynamics.
WAVETREND
Display of WaveTrend:
Display of WaveTrend Setting:
WaveTrend Indicator Explanation
The WaveTrend indicator helps identify overbought and oversold conditions, as well as potential buy and sell signals. Its flexibility allows traders to adapt it to various strategies, making it a versatile tool in technical analysis.
WaveTrend Input Settings:
WT MA Source: Default: HLC3
What it is: The data source used for calculating the WaveTrend Moving Average.
What it does: Determines the input data to smooth price action and filter noise.
Example: Using HLC3 (average of High, Low, Close) provides a smoother data representation compared to using just the closing price.
Length (WT MA Length): Default: 3
What it is: The period used to calculate the Moving Average.
What it does: Adjusts the sensitivity of the WaveTrend indicator, where shorter lengths respond more quickly to price changes.
Example: A length of 3 is ideal for short-term analysis, providing quick reactions to price movements.
WT Channel Length & Average: Default: WT Channel Length = 9, Average = 12
What it is: Lengths used to calculate the WaveTrend channel and its average.
What it does: Smooths out the WaveTrend further, reducing false signals by averaging over a set period.
Example: Higher values reduce noise and help in identifying more reliable trends.
Channel: Style, Width, and Color:
What it is: Customization options for the WaveTrend channel's appearance.
What it does: Adjusts how the channel is displayed, including line style, width, and color.
Example: Choosing an area style with a distinct color can make the WaveTrend indicator clearly visible on the chart.
WT Buy & Sell Signals:
What it is: Settings to enable and customize buy and sell signals based on WaveTrend.
What it does: Allows for the display of buy/sell signals and customization of their shapes and colors.
When it gives a Buy Signal: Generated when the WaveTrend line crosses below an oversold level and then rises back, indicating a potential upward price movement.
When it gives a Sell Signal: Triggered when the WaveTrend line crosses above an overbought level and then declines, suggesting a possible downward trend.
Example: The script identifies these signals based on mean reversion principles, where prices tend to revert to the mean after reaching extremes. Traders can use these signals to time their entries and exits effectively.
WAVETREND OVERBOUGTH AND OVERSOLD LEVELS
Display of WaveTrend with Overbought & Oversold Levels:
Display of WaveTrend Overbought & Oversold Levels Settings:
WaveTrend Overbought & Oversold Levels Explanation
WT OB & OS Levels: Default: OB Level 1 = 53, OB Level 2 = 60, OS Level 1 = -53, OS Level 2 = -60
What it is: The default overbought and oversold levels used by the WaveTrend indicator to signal potential market reversals.
What it does: When the WaveTrend crosses above the OB levels, it indicates an overbought condition, potentially signaling a reversal or selling opportunity. Conversely, when it crosses below the OS levels, it indicates an oversold condition, potentially signaling a reversal or buying opportunity.
Example: A trader might use these levels to time entry or exit points, such as selling when the WaveTrend crosses into the overbought zone or buying when it crosses into the oversold zone.
Show OB/OS Levels: Default: True
What it is: Toggle options to show or hide the overbought and oversold levels on your chart.
What it does: When enabled, these levels will be visually represented on your chart, helping you to easily identify when the market reaches these critical thresholds.
Example: Displaying these levels can help you quickly see when the WaveTrend is approaching or has crossed into overbought or oversold territory, allowing for more informed trading decisions.
Line Style, Width, and Color for OB/OS Levels:
What it is: Options to customize the appearance of the OB and OS levels on your chart, including line style (solid, dotted, dashed), line width, and color.
What it does: These settings allow you to adjust how prominently these levels are displayed on your chart, which can help you better visualize and respond to overbought or oversold conditions.
Example: Setting a thicker, dashed line in a contrasting color can make these levels stand out more clearly, aiding in quick visual identification.
Example of Use:
Scenario: A trader wants to identify potential selling points when the market is overbought. They set the OB levels at 53 and 60, choosing a solid, red line style to make these levels clear on their chart. As the WaveTrend crosses above 53, they monitor for further price action, and upon crossing 60, they consider initiating a sell order.
WAVETREND DIVERGENCES
Display of WaveTrend Divergence:
Display of WaveTrend Divergence Setting:
WaveTrend Divergence Indicator Explanation
The WaveTrend Divergence feature helps identify potential reversal points in the market by highlighting divergences between the price and the WaveTrend indicator. Divergences can signal a shift in market momentum, indicating a possible trend reversal. This component allows traders to visualize and customize divergence detection on their charts.
WaveTrend Divergence Input Settings:
Potential Reversal Range: Default: 28
What it is: The number of bars to look back when detecting potential tops and bottoms.
What it does: Sets the range for identifying possible reversal points based on historical data.
Example: A setting of 28 looks back across the last 28 bars to find reversal points, offering a balance between responsiveness and reliability.
Reversal Minimum LVL OB & OS: Default: OB = 35, OS = -35
What it is: The minimum overbought and oversold levels required for detecting potential reversals.
What it does: Adjusts the thresholds that trigger a reversal signal based on the WaveTrend indicator.
Example: A higher OB level reduces the sensitivity to overbought conditions, potentially filtering out false reversal signals.
Lookback Bar Left & Right: Default: Left = 10, Right = 1
What it is: The number of bars to the left and right used to confirm a top or bottom.
What it does: Helps determine the position of peaks and troughs in the price action.
Example: A larger left lookback captures more extended price action before the peak, while a smaller right lookback focuses on the immediate past.
Lookback Range Min & Max: Default: Min = 5, Max = 60
What it is: The minimum and maximum range for the lookback period when identifying divergences.
What it does: Fine-tunes the detection of divergences by controlling the range over which the indicator looks back.
Example: A wider range increases the chances of detecting divergences across different market conditions.
R.Div Minimum LVL OB & OS: Default: OB = 53, OS = -53
What it is: The threshold levels for detecting regular divergences.
What it does: Adjusts the sensitivity of the regular divergence detection.
Example: Higher thresholds make the detection more conservative, identifying only stronger divergence signals.
H.Div Minimum LVL OB & OS: Default: OB = 20, OS = -20
What it is: The threshold levels for detecting hidden divergences.
What it does: Similar to regular divergence settings but for hidden divergences, which can indicate potential reversals that are less obvious.
Example: Lower thresholds make the hidden divergence detection more sensitive, capturing subtler market shifts.
Divergence Label Options:
What it is: Options to display and customize labels for regular and hidden divergences.
What it does: Allows users to visually differentiate between regular and hidden divergences using customizable labels and colors.
Example: Using different colors and symbols for regular (R) and hidden (H) divergences makes it easier to interpret signals on the chart.
Text Size and Color:
What it is: Customization options for the size and color of divergence labels.
What it does: Adjusts the readability and visibility of divergence labels on the chart.
Example: Larger text size may be preferred for charts with a lot of data, ensuring divergence labels stand out clearly.
FAST & SLOW MONEY FLOW INDEX
Display of Fast & Slow Money Flow:
Display of Fast & Slow Money Flow Setting:
Fast Money Flow Indicator Explanation
The Fast Money Flow indicator helps traders identify the flow of money into and out of an asset over a shorter time frame. By tracking the volume-weighted average of price movements, it provides insights into buying and selling pressure in the market, which can be crucial for making timely trading decisions.
Fast Money Flow Input Settings:
Fast Money Flow: Length: Default: 9
What it is: The period used for calculating the Fast Money Flow.
What it does: Determines the sensitivity of the Money Flow calculation. A shorter length makes the indicator more responsive to recent price changes, while a longer length provides a smoother signal.
Example: A length of 9 is suitable for traders looking to capture quick shifts in market sentiment over a short period.
Fast MFI Area Multiplier: Default: 5
What it is: A multiplier applied to the Money Flow area calculation.
What it does: Adjusts the size of the Money Flow area on the chart, effectively amplifying or reducing the visual impact of the indicator.
Example: A higher multiplier can make the Money Flow more prominent on the chart, aiding in the quick identification of significant money flow changes.
Y Position (Y Pos): Default: 0
What it is: The vertical position adjustment for the Fast Money Flow plot on the chart.
What it does: Allows you to move the Money Flow plot up or down on the chart to avoid overlap with other indicators.
Example: Adjusting the Y Position can be useful if you have multiple indicators on the chart and need to maintain clarity.
Fast MFI Style, Width, and Color:
What it is: Customization options for how the Fast Money Flow is displayed on the chart.
What it does: Enables you to choose between different plot styles (line or area), set the line width, and select colors for positive and negative money flow.
Example: Using different colors for positive (green) and negative (red) money flow helps to visually distinguish between periods of buying and selling pressure.
Slow Money Flow Indicator Explanation
The Slow Money Flow indicator tracks the flow of money into and out of an asset over a longer time frame. It provides a broader perspective on market sentiment, smoothing out short-term fluctuations and highlighting longer-term trends.
Slow Money Flow Input Settings:
Slow Money Flow: Length: Default: 12
What it is: The period used for calculating the Slow Money Flow.
What it does: A longer period smooths out short-term fluctuations, providing a clearer view of the overall money flow trend.
Example: A length of 12 is often used by traders looking to identify sustained trends rather than short-term volatility.
Slow MFI Area Multiplier: Default: 5
What it is: A multiplier applied to the Slow Money Flow area calculation.
What it does: Adjusts the size of the Money Flow area on the chart, helping to emphasize the indicator’s significance.
Example: Increasing the multiplier can help highlight the Money Flow in markets with less volatile price action.
Y Position (Y Pos): Default: 0
What it is: The vertical position adjustment for the Slow Money Flow plot on the chart.
What it does: Allows for vertical repositioning of the Money Flow plot to maintain chart clarity when used with other indicators.
Example: Adjusting the Y Position ensures that the Slow Money Flow indicator does not overlap with other key indicators on the chart.
Slow MFI Style, Width, and Color:
What it is: Customization options for the visual display of the Slow Money Flow on the chart.
What it does: Allows you to choose the plot style (line or area), set the line width, and select colors to differentiate positive and negative money flow.
Example: Customizing the colors for the Slow Money Flow allows traders to quickly distinguish between buying and selling trends in the market.
RSI
Display of RSI:
Display of RSI Setting:
RSI Indicator Explanation
The Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements. It is typically used to identify overbought or oversold conditions in the market, providing traders with potential signals for buying or selling.
RSI Input Settings:
RSI Source: Default: Close
What it is: The data source used for calculating the RSI.
What it does: Determines which price data (e.g., close, open) is used in the RSI calculation, affecting how the indicator reflects market conditions.
Example: Using the closing price is standard practice, as it reflects the final agreed-upon price for a given time period.
MA Type (Moving Average Type): Default: SMA
What it is: The type of moving average applied to the RSI for smoothing purposes.
What it does: Changes the smoothing technique of the RSI, impacting how quickly the indicator responds to price movements.
Example: Using an Exponential Moving Average (EMA) will make the RSI more sensitive to recent price changes compared to a Simple Moving Average (SMA).
RSI Length: Default: 14
What it is: The period over which the RSI is calculated.
What it does: Adjusts the sensitivity of the RSI. A shorter length (e.g., 7) makes the RSI more responsive to recent price changes, while a longer length (e.g., 21) smooths out the indicator, reducing the number of signals.
Example: A 14-period RSI is commonly used for identifying overbought and oversold conditions, providing a balance between sensitivity and reliability.
RSI Plot Style, Width, and Color:
What it is: Options to customize the appearance of the RSI line on the chart.
What it does: Allows you to adjust the visual representation of the RSI, including the line width and color.
Example: Setting a thicker line width and a bright color like yellow can make the RSI more visible on the chart, aiding in quick analysis.
Display of RSI with RSI Moving Average:
RSI Moving Average Explanation
The RSI Moving Average adds a smoothing layer to the RSI, helping to filter out noise and provide clearer signals. It is particularly useful for confirming trend strength and identifying potential reversals.
RSI Moving Average Input Settings:
MA Length: Default: 14
What it is: The period over which the Moving Average is calculated on the RSI.
What it does: Adjusts the smoothing of the RSI, helping to reduce false signals and provide a clearer trend indication.
Example: A 14-period moving average on the RSI can smooth out short-term fluctuations, making it easier to spot genuine overbought or oversold conditions.
MA Plot Style, Width, and Color:
What it is: Customization options for how the RSI Moving Average is displayed on the chart.
What it does: Allows you to adjust the line width and color, helping to differentiate the Moving Average from the main RSI line.
Example: Using a contrasting color for the RSI Moving Average (e.g., magenta) can help it stand out against the main RSI line, making it easier to interpret the indicator.
STOCHASTIC RSI
Display of Stochastic RSI:
Display of Stochastic RSI Setting:
Stochastic RSI Indicator Explanation
The Stochastic RSI (Stoch RSI) is a momentum oscillator that measures the level of the RSI relative to its high-low range over a set period of time. It is used to identify overbought and oversold conditions, providing potential buy and sell signals based on momentum shifts.
Stochastic RSI Input Settings:
Stochastic RSI Length: Default: 14
What it is: The period over which the Stochastic RSI is calculated.
What it does: Adjusts the sensitivity of the Stochastic RSI. A shorter length makes the indicator more responsive to recent price changes, while a longer length smooths out the fluctuations, reducing noise.
Example: A length of 14 is commonly used to identify momentum shifts over a medium-term period, providing a balanced view of potential overbought or oversold conditions.
Display of Stochastic RSI %K Line:
Stochastic RSI %K Line Explanation
The %K line in the Stochastic RSI is the main line that tracks the momentum of the RSI over the chosen period. It is the faster-moving component of the Stochastic RSI, often used to identify entry and exit points.
Stochastic RSI %K Input Settings:
%K Length: Default: 3
What it is: The period used for smoothing the %K line of the Stochastic RSI.
What it does: Smoothing the %K line helps reduce noise and provides a clearer signal for potential market reversals.
Example: A smoothing length of 3 is common, offering a balance between responsiveness and noise reduction, making it easier to spot significant momentum shifts.
%K Plot Style, Width, and Color:
What it is: Customization options for the visual representation of the %K line.
What it does: Allows you to adjust the appearance of the %K line on the chart, including line width and color, to fit your visual preferences.
Example: Setting a blue color and a medium width for the %K line makes it stand out clearly on the chart, helping to identify key points of momentum change.
%K Fill Color (Above):
What it is: The fill color that appears above the %K line on the chart.
What it does: Adds visual clarity by shading the area above the %K line, making it easier to interpret the direction and strength of momentum.
Example: Using a light blue fill color above the %K line can help emphasize bullish momentum, making it visually prominent.
Display of Stochastic RSI %D Line:
Stochastic RSI %D Line Explanation
The %D line in the Stochastic RSI is a moving average of the %K line and acts as a signal line. It is slower-moving compared to the %K line and is often used to confirm signals or identify potential reversals when it crosses the %K line.
Stochastic RSI %D Input Settings:
%D Length: Default: 3
What it is: The period used for smoothing the %D line of the Stochastic RSI.
What it does: Smooths out the %D line, making it less sensitive to short-term fluctuations and more reliable for identifying significant market signals.
Example: A length of 3 is often used to provide a smoothed signal line that can help confirm trends or reversals indicated by the %K line.
%D Plot Style, Width, and Color:
What it is: Customization options for the visual representation of the %D line.
What it does: Allows you to adjust the appearance of the %D line on the chart, including line width and color, to match your preferences.
Example: Setting an orange color and a thicker line width for the %D line can help differentiate it from the %K line, making crossover points easier to spot.
%D Fill Color (Below):
What it is: The fill color that appears below the %D line on the chart.
What it does: Adds visual clarity by shading the area below the %D line, making it easier to interpret bearish momentum.
Example: Using a light orange fill color below the %D line can highlight bearish conditions, making it visually easier to identify.
RSI & STOCHASTIC RSI OVERBOUGHT AND OVERSOLD LEVELS
Display of RSI & Stochastic with Overbought & Oversold Levels:
Display of RSI & Stochastic Overbought & Oversold Settings:
RSI & Stochastic Overbought & Oversold Levels Explanation
The Overbought (OB) and Oversold (OS) levels for RSI and Stochastic RSI indicators are key thresholds that help traders identify potential reversal points in the market. These levels are used to determine when an asset is likely overbought or oversold, which can signal a potential trend reversal.
RSI & Stochastic Overbought & Oversold Input Settings:
RSI & Stochastic Level 1 Overbought (OB) & Oversold (OS): Default: OB Level = 170, OS Level = 130
What it is: The first set of thresholds for determining overbought and oversold conditions for both RSI and Stochastic RSI indicators.
What it does: When the RSI or Stochastic RSI crosses above the overbought level, it suggests that the asset might be overbought, potentially signaling a sell opportunity. Conversely, when these indicators drop below the oversold level, it suggests the asset might be oversold, potentially signaling a buy opportunity.
Example: If the RSI crosses above 170, traders might look for signs of a potential trend reversal to the downside, while a cross below 130 might indicate a reversal to the upside.
RSI & Stochastic Level 2 Overbought (OB) & Oversold (OS): Default: OB Level = 180, OS Level = 120
What it is: The second set of thresholds for determining overbought and oversold conditions for both RSI and Stochastic RSI indicators.
What it does: These levels provide an additional set of reference points, allowing traders to differentiate between varying degrees of overbought and oversold conditions, potentially leading to more refined trading decisions.
Example: When the RSI crosses above 180, it might indicate an extreme overbought condition, which could be a stronger signal for a sell, while a cross below 120 might indicate an extreme oversold condition, which could be a stronger signal for a buy.
RSI & Stochastic Overbought (OB) Band Customization:
OB Level 1: Width, Style, and Color:
What it is: Customization options for the visual appearance of the first overbought band on the chart.
What it does: Allows you to set the line width, style (solid, dotted, dashed), and color for the first overbought band, enhancing its visibility on the chart.
Example: A dashed red line with medium width can clearly indicate the first overbought level, helping traders quickly identify when this threshold is crossed.
OB Level 2: Width, Style, and Color:
What it is: Customization options for the visual appearance of the second overbought band on the chart.
What it does: Allows you to set the line width, style, and color for the second overbought band, providing a clear distinction from the first band.
Example: A dashed red line with a slightly thicker width can represent a more significant overbought level, making it easier to differentiate from the first level.
RSI & Stochastic Oversold (OS) Band Customization:
OS Level 1: Width, Style, and Color:
What it is: Customization options for the visual appearance of the first oversold band on the chart.
What it does: Allows you to set the line width, style (solid, dotted, dashed), and color for the first oversold band, making it visually prominent.
Example: A dashed green line with medium width can highlight the first oversold level, helping traders identify potential buying opportunities.
OS Level 2: Width, Style, and Color:
What it is: Customization options for the visual appearance of the second oversold band on the chart.
What it does: Allows you to set the line width, style, and color for the second oversold band, providing an additional visual cue for extreme oversold conditions.
Example: A dashed green line with a thicker width can represent a more significant oversold level, offering a stronger visual cue for potential buying opportunities.
RSI DIVERGENCES
Display of RSI Divergence Labels:
Display of RSI Divergence Settings:
RSI Divergence Lookback Explanation
The RSI Divergence settings allow traders to customize the parameters for detecting divergences between the RSI (Relative Strength Index) and price action. Divergences occur when the price moves in the opposite direction to the RSI, potentially signaling a trend reversal. These settings help refine the accuracy of divergence detection by adjusting the lookback period and range. ( NOTE: This setting only imply to the RSI. This doesn't effect the STOCHASTIC RSI. )
RSI Divergence Lookback Input Settings:
Lookback Left: Default: 10
What it is: The number of bars to look back from the current bar to detect a potential divergence.
What it does: Defines the left-side lookback period for identifying pivot points in the RSI, which are used to spot divergences. A longer lookback period may capture more significant trends but could also miss shorter-term divergences.
Example: A setting of 10 bars means the script will consider pivot points up to 10 bars before the current bar to check for divergence patterns.
Lookback Right: Default: 1
What it is: The number of bars to look forward from the current bar to complete the divergence pattern.
What it does: Defines the right-side lookback period for confirming a potential divergence. This setting helps ensure that the identified divergence is valid by allowing the script to check subsequent bars for confirmation.
Example: A setting of 1 bar means the script will look at the next bar to confirm the divergence pattern, ensuring that the signal is reliable.
Lookback Range Min: Default: 5
What it is: The minimum range of bars required to detect a valid divergence.
What it does: Sets a lower bound on the range of bars considered for divergence detection. A lower minimum range might capture more frequent but possibly less significant divergences.
Example: Setting the minimum range to 5 ensures that only divergences spanning at least 5 bars are considered, filtering out very short-term patterns.
Lookback Range Max: Default: 60
What it is: The maximum range of bars within which a divergence can be detected.
What it does: Sets an upper bound on the range of bars considered for divergence detection. A larger maximum range might capture more significant divergences but could also include less relevant long-term patterns.
Example: Setting the maximum range to 60 bars allows the script to detect divergences over a longer timeframe, capturing more extended divergence patterns that could indicate major trend reversals.
RSI Divergence Explanation
RSI divergences occur when the RSI indicator and price action move in opposite directions, signaling potential trend reversals. This section of the settings allows traders to customize the appearance and detection of both regular and hidden bullish and bearish divergences.
RSI Divergence Input Settings:
R. Bullish Div Label: Default: True
What it is: An option to display labels for regular bullish divergences.
What it does: Enables or disables the visibility of labels that mark regular bullish divergences, where the price makes a lower low while the RSI makes a higher low, indicating a potential upward reversal.
Example: A trader might use this to spot buying opportunities in a downtrend when a bullish divergence suggests the trend may be reversing.
Bullish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of regular bullish divergence labels.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: Selecting a green label color and a distinct line width makes bullish divergences easily recognizable on your chart.
R. Bearish Div Label: Default: True
What it is: An option to display labels for regular bearish divergences.
What it does: Enables or disables the visibility of labels that mark regular bearish divergences, where the price makes a higher high while the RSI makes a lower high, indicating a potential downward reversal.
Example: A trader might use this to spot selling opportunities in an uptrend when a bearish divergence suggests the trend may be reversing.
Bearish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of regular bearish divergence labels.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: Choosing a red label color and a specific line width makes bearish divergences clearly stand out on your chart.
H. Bullish Div Label: Default: False
What it is: An option to display labels for hidden bullish divergences.
What it does: Enables or disables the visibility of labels that mark hidden bullish divergences, where the price makes a higher low while the RSI makes a lower low, indicating potential continuation of an uptrend.
Example: A trader might use this to confirm an existing uptrend when a hidden bullish divergence signals continued buying strength.
Hidden Bullish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of hidden bullish divergence labels.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: A softer green color with a thinner line width might be chosen to subtly indicate hidden bullish divergences, keeping the chart clean while providing useful information.
H. Bearish Div Label: Default: False
What it is: An option to display labels for hidden bearish divergences.
What it does: Enables or disables the visibility of labels that mark hidden bearish divergences, where the price makes a lower high while the RSI makes a higher high, indicating potential continuation of a downtrend.
Example: A trader might use this to confirm an existing downtrend when a hidden bearish divergence signals continued selling pressure.
Hidden Bearish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of hidden bearish divergence labels.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: A muted red color with a thinner line width might be selected to indicate hidden bearish divergences without overwhelming the chart.
Divergence Text Size and Color: Default: S (Small)
What it is: Settings to adjust the size and color of text labels for RSI divergences.
What it does: Allows you to customize the size and color of text labels that display the divergence information on the chart.
Example: Choosing a small text size with a bright white color can make divergence labels easily readable without taking up too much space on the chart.
STOCHASTIC DIVERGENCES
Display of Stochastic RSI Divergence Labels:
Display of Stochastic RSI Divergence Settings:
Stochastic RSI Divergence Explanation
Stochastic RSI divergences occur when the Stochastic RSI indicator and price action move in opposite directions, signaling potential trend reversals. These settings allow traders to customize the detection and visual representation of both regular and hidden bullish and bearish divergences in the Stochastic RSI.
Stochastic RSI Divergence Input Settings:
R. Bullish Div Label: Default: True
What it is: An option to display labels for regular bullish divergences in the Stochastic RSI.
What it does: Enables or disables the visibility of labels that mark regular bullish divergences, where the price makes a lower low while the Stochastic RSI makes a higher low, indicating a potential upward reversal.
Example: A trader might use this to spot buying opportunities in a downtrend when a bullish divergence in the Stochastic RSI suggests the trend may be reversing.
Bullish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of regular bullish divergence labels in the Stochastic RSI.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: Selecting a blue label color and a distinct line width makes bullish divergences in the Stochastic RSI easily recognizable on your chart.
R. Bearish Div Label: Default: True
What it is: An option to display labels for regular bearish divergences in the Stochastic RSI.
What it does: Enables or disables the visibility of labels that mark regular bearish divergences, where the price makes a higher high while the Stochastic RSI makes a lower high, indicating a potential downward reversal.
Example: A trader might use this to spot selling opportunities in an uptrend when a bearish divergence in the Stochastic RSI suggests the trend may be reversing.
Bearish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of regular bearish divergence labels in the Stochastic RSI.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: Choosing an orange label color and a specific line width makes bearish divergences in the Stochastic RSI clearly stand out on your chart.
H. Bullish Div Label: Default: False
What it is: An option to display labels for hidden bullish divergences in the Stochastic RSI.
What it does: Enables or disables the visibility of labels that mark hidden bullish divergences, where the price makes a higher low while the Stochastic RSI makes a lower low, indicating potential continuation of an uptrend.
Example: A trader might use this to confirm an existing uptrend when a hidden bullish divergence in the Stochastic RSI signals continued buying strength.
Hidden Bullish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of hidden bullish divergence labels in the Stochastic RSI.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: A softer blue color with a thinner line width might be chosen to subtly indicate hidden bullish divergences, keeping the chart clean while providing useful information.
H. Bearish Div Label: Default: False
What it is: An option to display labels for hidden bearish divergences in the Stochastic RSI.
What it does: Enables or disables the visibility of labels that mark hidden bearish divergences, where the price makes a lower high while the Stochastic RSI makes a higher high, indicating potential continuation of a downtrend.
Example: A trader might use this to confirm an existing downtrend when a hidden bearish divergence in the Stochastic RSI signals continued selling pressure.
Hidden Bearish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of hidden bearish divergence labels in the Stochastic RSI.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: A muted orange color with a thinner line width might be selected to indicate hidden bearish divergences without overwhelming the chart.
Divergence Text Size and Color: Default: S (Small)
What it is: Settings to adjust the size and color of text labels for Stochastic RSI divergences.
What it does: Allows you to customize the size and color of text labels that display the divergence information on the chart.
Example: Choosing a small text size with a bright white color can make divergence labels easily readable without taking up too much space on the chart.
Alert System:
Custom Alerts for Divergences and Reversals:
What it is: The script includes customizable alert conditions to notify you of detected divergences or potential reversals based on WaveTrend, RSI, and Stochastic RSI.
What it does: Helps you stay informed of key market movements without constantly monitoring the charts, enabling timely decisions.
Example: Setting an alert for regular bearish divergence on the WaveTrend could notify you of a potential sell opportunity as soon as it is detected.
How to Use Alerts:
Set up custom alerts in TradingView based on these conditions to be notified of potential trading opportunities. Alerts are triggered when the indicator detects conditions that match the selected criteria, such as divergences or potential reversals.
By following the detailed guidelines and examples above, you can effectively use and customize this powerful indicator to suit your trading strategy.
For further understanding and customization, refer to the input settings within the script and adjust them to match your trading style and preferences.
How Components Work Together
Synergy and Cross-Validation: The indicator combines multiple layers of analysis to validate trading signals. For example, a WaveTrend buy signal that coincides with a bullish divergence in RSI and positive fast money flow is likely to be more reliable than any single indicator’s signal. This cross-validation reduces the likelihood of false signals and enhances decision-making.
Comprehensive Market Analysis: Each component plays a role in analyzing different aspects of the market. WaveTrend focuses on trend strength, Money Flow indicators assess market sentiment, while RSI and Stochastic RSI offer detailed views of price momentum and potential reversals.
Ideal For
Traders who require a reliable, multifaceted tool for detecting market trends and reversals.
Investors seeking a deeper understanding of market dynamics across different timeframes and conditions, whether in forex, equities, or cryptocurrency markets.
This script is designed to provide a comprehensive tool for technical analysis, combining multiple indicators and divergence detection into one versatile and customizable script. It is especially useful for traders who want to monitor various indicators simultaneously and look for convergence or divergence signals across different technical tools.
Acknowledgements
Special thanks to these amazing creators for inspiration and their creations:
I want to thank these amazing creators for creating there amazing indicators , that inspired me and also gave me a head start by making this indicator! Without their amazing indicators it wouldn't be possible!
vumanchu: VuManChu Cipher B Divergences.
MisterMoTa: RSI + Divergences + Alerts .
DevLucem: Plain Stochastic Divergence.
Note
This indicator is designed to be a powerful tool in your trading arsenal. However , it is essential to backtest and adjust the settings according to your trading strategy before applying it to live trading . If you have any questions or need further assistance, feel free to reach out.
25-Day Momentum IndexDescription:
The 25-Day Momentum Index (25D MI) is a technical indicator designed to measure the strength and direction of price movements over a 25-day period. Inspired by classic momentum analysis, this indicator helps traders identify trends and potential reversal points in the market.
How It Works:
Momentum Calculation: The 25D MI calculates momentum as the difference between the current closing price and the closing price 25 days ago. This difference provides insights into the market's recent strength or weakness.
Plotting: The indicator plots the Momentum Index as a blue line, showing the raw momentum values. A zero line is also plotted in gray to serve as a reference point for positive and negative momentum.
Highlighting Zones:
Positive Momentum: When the Momentum Index is above zero, it is plotted in green, highlighting positive momentum phases.
Negative Momentum: When the Momentum Index is below zero, it is plotted in red, highlighting negative momentum phases.
Usage:
A rising curve means an increase in upward momentum - if it is above the zero line. A rising curve below the zero line signifies a decrease in downward momentum. By the same token, a falling curve means an increase in downward momentum below the zero line, a decrease in upward momentum above the zero line.
This indicator is ideal for traders looking to complement their strategy with a visual tool that captures the essence of market momentum over a significant period. Use it to enhance your technical analysis and refine your trading decisions.
RSI K-Means Clustering [UAlgo]The "RSI K-Means Clustering " indicator is a technical analysis tool that combines the Relative Strength Index (RSI) with K-means clustering techniques. This approach aims to provide more nuanced insights into market conditions by categorizing RSI values into overbought, neutral, and oversold clusters.
The indicator adjusts these clusters dynamically based on historical RSI data, allowing for more adaptive and responsive thresholds compared to traditional fixed levels. By leveraging K-means clustering, the indicator identifies patterns in RSI behavior, which can help traders make more informed decisions regarding market trends and potential reversals.
🔶 Key Features
K-means Clustering: The indicator employs K-means clustering, an unsupervised machine learning technique, to dynamically determine overbought, neutral, and oversold levels based on historical RSI data.
User-Defined Inputs: You can customize various aspects of the indicator's behavior, including:
RSI Source: Select the data source used for RSI calculation (e.g., closing price).
RSI Length: Define the period length for RSI calculation.
Training Data Size: Specify the number of historical RSI values used for K-means clustering.
Number of K-means Iterations: Set the number of iterations performed by the K-means algorithm to refine cluster centers.
Overbought/Neutral/Oversold Levels: You can define initial values for these levels, which will be further optimized through K-means clustering.
Alerts: The indicator can generate alerts for various events, including:
Trend Crossovers: Alerts for when the RSI crosses above/below the neutral zone, signaling potential trend changes.
Overbought/Oversold: Alerts when the RSI reaches the dynamically determined overbought or oversold thresholds.
Reversals: Alerts for potential trend reversals based on RSI crossing above/below the calculated overbought/oversold levels.
RSI Classification: Alerts based on the current RSI classification (ranging, uptrend, downtrend).
🔶 Interpreting Indicator
Adjusted RSI Value: The primary plot represents the adjusted RSI value, calculated based on the relative position of the current RSI compared to dynamically adjusted overbought and oversold levels. This value provides an intuitive measure of the market's momentum. The final overbought, neutral, and oversold levels are determined by K-means clustering and are displayed as horizontal lines. These levels serve as dynamic support and resistance points, indicating potential reversal zones.
Classification Symbols : The "RSI K-Means Clustering " indicator uses specific symbols to classify the current market condition based on the position of the RSI value relative to dynamically determined clusters. These symbols provide a quick visual reference to help traders understand the prevailing market sentiment. Here's a detailed explanation of each classification symbol:
Ranging Classification ("R")
This symbol appears when the RSI value is closest to the neutral threshold compared to the overbought or oversold thresholds. It indicates a ranging market, where the price is moving sideways without a clear trend direction. In this state, neither buyers nor sellers are in control, suggesting a period of consolidation or indecision. This is often seen as a time to wait for a breakout or reversal signal before taking a position.
Up-Trend Classification ("↑")
The up-trend symbol, represented by an upward arrow, is displayed when the RSI value is closer to the overbought threshold than to the neutral or oversold thresholds. This classification suggests that the market is in a bullish phase, with buying pressure outweighing selling pressure. Traders may consider this as a signal to enter or hold long positions, as the price is likely to continue rising until the market reaches an overbought condition.
Down-Trend Classification ("↓")
The down-trend symbol, depicted by a downward arrow, appears when the RSI value is nearest to the oversold threshold. This indicates a bearish market condition, where selling pressure dominates. The market is likely experiencing a downward movement, and traders might view this as an opportunity to enter or hold short positions. This symbol serves as a warning of potential further declines, especially if the RSI continues to move toward the oversold level.
Bullish Reversal ("▲")
This signal occurs when the RSI value crosses above the oversold threshold. It indicates a potential shift from a downtrend to an uptrend, suggesting that the market may start to move higher. Traders might use this signal as an opportunity to enter long positions.
Bearish Reversal ("▼")
This signal appears when the RSI value crosses below the overbought threshold. It suggests a possible transition from an uptrend to a downtrend, indicating that the market may begin to decline. This signal can alert traders to consider entering short positions or taking profits on long positions.
These classification symbols are plotted near the adjusted RSI line, with their positions adjusted based on the standard deviation and a distance multiplier. This placement helps in visualizing the classification's strength and ensuring clarity in the indicator's presentation. By monitoring these symbols, traders can quickly assess the market's state and make more informed trading decisions.
🔶 Disclaimer
Use with Caution: This indicator is provided for educational and informational purposes only and should not be considered as financial advice. Users should exercise caution and perform their own analysis before making trading decisions based on the indicator's signals.
Not Financial Advice: The information provided by this indicator does not constitute financial advice, and the creator (UAlgo) shall not be held responsible for any trading losses incurred as a result of using this indicator.
Backtesting Recommended: Traders are encouraged to backtest the indicator thoroughly on historical data before using it in live trading to assess its performance and suitability for their trading strategies.
Risk Management: Trading involves inherent risks, and users should implement proper risk management strategies, including but not limited to stop-loss orders and position sizing, to mitigate potential losses.
No Guarantees: The accuracy and reliability of the indicator's signals cannot be guaranteed, as they are based on historical price data and past performance may not be indicative of future results.
Ultimate Bands [BigBeluga]Ultimate Bands
The Ultimate Bands indicator is an advanced technical analysis tool that combines elements of volatility bands, oscillators, and trend analysis. It provides traders with a comprehensive view of market conditions, including trend direction, momentum, and potential reversal points.
🔵 KEY FEATURES
● Ultimate Bands
Consists of an upper band, lower band, and a smooth middle line
Based on John Ehler's SuperSmoother algorithm for reduced lag
Bands are calculated using Root Mean Square Deviation (RMSD) for adaptive volatility measurement
Helps identify potential support and resistance levels
● Ultimate Oscillator
Derived from the price position relative to the Ultimate Bands
Oscillates between overbought and oversold levels
Provides insights into potential reversals and trend strength
● Trend Signal Line
Based on a Hull Moving Average (HMA) of the Ultimate Oscillator
Helps identify the overall trend direction
Color-coded for easy trend interpretation
● Heatmap Visualization
Displays the current state of the oscillator and trend signal
Provides an intuitive visual representation of market conditions
Shows overbought/oversold status and trend direction at a glance
● Breakout Signals
Optional feature to detect and display breakouts beyond the Ultimate Bands
Helps identify potential trend reversals or continuations
Visualized with arrows on the chart and color-coded candles
🔵 HOW TO USE
● Trend Identification
Use the color and position of the Trend Signal Line to determine the overall market trend
Refer to the heatmap for a quick visual confirmation of trend direction
● Entry Signals
Look for price touches or breaks of the Ultimate Bands for potential entry points
Use oscillator extremes in conjunction with band touches for stronger signals
Consider breakout signals (if enabled) for trend-following entries
● Exit Signals
Use opposite band touches or breakouts as potential exit points
Monitor the oscillator for divergences or extreme readings as exit signals
● Overbought/Oversold Analysis
Use the Ultimate Oscillator and heatmap to identify overbought/oversold conditions
Look for potential reversals when the oscillator reaches extreme levels
● Confirmation
Combine Ultimate Bands, Oscillator, and Trend Signal for stronger trade confirmation
Use the heatmap for quick visual confirmation of market conditions
🔵 CUSTOMIZATION
The Ultimate Bands indicator offers several customization options:
Adjust the main calculation length for bands and oscillator
Modify the number of standard deviations for band calculation
Change the signal line length for trend analysis
Toggle the display of breakout signals and candle coloring
By fine-tuning these settings, traders can adapt the Ultimate Bands indicator to various market conditions and personal trading strategies.
The Ultimate Bands indicator provides a multi-faceted approach to market analysis, combining volatility-based bands, oscillator analysis, and trend identification in one comprehensive tool. Its adaptive nature and visual cues make it suitable for both novice and experienced traders across various timeframes and markets. The integration of multiple analytical elements offers traders a rich set of data points to inform their trading decisions.