Moving Average Z-Score Suite [BackQuant]Moving Average Z-Score Suite
1. What is this indicator
The Moving Average Z-Score Suite is a versatile indicator designed to help traders identify and capitalize on market trends by utilizing a variety of moving averages. This indicator transforms selected moving averages into a Z-Score oscillator, providing clear signals for potential buy and sell opportunities. The indicator includes options to choose from eleven different moving average types, each offering unique benefits and characteristics. It also provides additional features such as standard deviation levels, extreme levels, and divergence detection, enhancing its utility in various market conditions.
2. What is a Z-Score
A Z-Score is a statistical measurement that describes a value's relationship to the mean of a group of values. It is measured in terms of standard deviations from the mean. For instance, a Z-Score of 1.0 means the value is one standard deviation above the mean, while a Z-Score of -1.0 indicates it is one standard deviation below the mean. In the context of financial markets, Z-Scores can be used to identify overbought or oversold conditions by determining how far a particular value (such as a moving average) deviates from its historical mean.
3. What moving averages can be used
The Moving Average Z-Score Suite allows users to select from the following eleven moving averages:
Simple Moving Average (SMA)
Hull Moving Average (HMA)
Exponential Moving Average (EMA)
Weighted Moving Average (WMA)
Double Exponential Moving Average (DEMA)
Running Moving Average (RMA)
Linear Regression Curve (LINREG) (This script can be found standalone )
Triple Exponential Moving Average (TEMA)
Arnaud Legoux Moving Average (ALMA)
Kalman Hull Moving Average (KHMA)
T3 Moving Average
Each of these moving averages has distinct properties and reacts differently to price changes, allowing traders to select the one that best fits their trading style and market conditions.
4. Why Turning a Moving Average into a Z-Score is Innovative and Its Benefits
Transforming a moving average into a Z-Score is an innovative approach because it normalizes the moving average values, making them more comparable across different periods and instruments. This normalization process helps in identifying extreme price movements and mean-reversion opportunities more effectively. By converting the moving average into a Z-Score, traders can better gauge the relative strength or weakness of a trend and detect potential reversals. This method enhances the traditional moving average analysis by adding a statistical perspective, providing clearer and more objective trading signals.
5. How It Can Be Used in the Context of a Trading System
In a trading system, it can be used to generate buy and sell signals based on the Z-Score values. When the Z-Score crosses above zero, it indicates a potential buying opportunity, suggesting that the price is above its mean and possibly trending upward. Conversely, a Z-Score crossing below zero signals a potential selling opportunity, indicating that the price is below its mean and might be trending downward. Additionally, the indicator's ability to show standard deviation levels and extreme levels helps traders set profit targets and stop-loss levels, improving risk management and trade planning.
6. How It Can Be Used for Trend Following
For trend-following strategies, it can be particularly useful. The Z-Score oscillator helps traders identify the strength and direction of a trend. By monitoring the Z-Score and its rate of change, traders can confirm the persistence of a trend and make informed decisions to enter or exit trades. The indicator's divergence detection feature further enhances trend-following by identifying potential reversals before they occur, allowing traders to capitalize on trend shifts. By providing a clear and quantifiable measure of trend strength, this indicator supports disciplined and systematic trend-following strategies.
No backtests for this indicator due to the many options and ways it can be used,
Enjoy
Dao động
FX Index Curve Oscillator (FICO)We can approximate the TVC:DXY with simple multiplication, rather than using geometric weighted averages; the values will be different, but the charts will look almost the same. Because we can make a "good enough" version of DXY, we can also extend this concept to the other major currencies:
AUD - Yellow
CAD - Red
CHF - Orange
EUR - Purple
GBP - Green
JPY - White
NZD - Lime green
USD - Blue
This indicator works by constructing an "index" for each currency, performing a lookback to figure out the rate of change, and then smoothing the values. These values are fed through an oscillator to normalize them between -1.00 and +1.00, before finally being smoothed again. Interestingly, using HMA to smooth them the second time will cause the values to leak past 1.00, which we can also use as a signal.
If you want to change the values, I find that the biggest difference comes from the lookback and oscillator settings; the MA/smoothing is probably good enough. The default settings are for doing forex trades on the daily chart. Other timeframes are possible, but I could not find any settings that work. It might also be possible to use a similar approach on other assets (crypto, metals, indexes, etc) but I have not tried yet.
In my own testing, what I found to be a good approach is to look for a currency to be above +1 and another to be below -1, and then look for color changes; ideally this will happen on the same bar/candle.
You can also consider two line crosses, breaking above or below 1, etc as other entry signals. I find that price will either move immediately, or take a candle or two to retrace and then start moving.
Happy trading!
Unfortunately, the indicator pane can get quite crowded; if you're testing for a single currency pair, you may want to disable some of the plotted lines:
Zig Zag/Consecutive Bars [UkutaLabs]█ OVERVIEW
The Zig Zag/Consecutive Bars indicator is a powerful trading tool that helps to visualise the flow of the market. This indicator allows users to see at a glance when a candle closes at a new high or a new low, which can be incorporated into a variety of trading strategies to better understand points of reversal and consolidation.
This indicator also displays the RSI score of each pivot, as well as a trailing count of how many bars it has been since there was a new high/low.
█ USAGE
As each bar finishes, the script will check if it closed above or below the previous bar’s high or low, depending on the current trend direction. When a new high or low is set, the script will then look for a move in the other direction. This can be a powerful tool that can identify when the market is trending strongly, as well as identifying when the market has a weak or no trend.
At each pivot point, the RSI score is displayed. This serves as additional confirmation to how strong the trend is. The RSI labels can be turned off in the settings.
As each trend develops, the script will count and display the number of bars that have closed since the most recent pivot. These labels can be turned off in the settings.
█ SETTINGS
Configuration
• Show RSI Scores: Determines whether or not labels displaying RSI scores are drawn.
• Show Counter: Determines whether or not labels displaying the number of bars since the most recent pivot are drawn.
• Line Color: Determines the color of the Zig Zag line.
Fisher Transform on RSIOverview
The Fisher Transform on RSI indicator combines the Relative Strength Index (RSI) with the Fisher Transform to offer a refined tool for identifying market turning points and trends. By applying the Fisher Transform to the RSI, this indicator converts RSI values into a Gaussian normal distribution, enhancing the precision of detecting overbought and oversold conditions. This method provides a clearer and more accurate identification of potential market reversals than the standard RSI.
Key/Unique Features
Fisher Transform Applied to RSI : Transforms RSI values into a Gaussian normal distribution, improving the detection of overbought and oversold conditions.
Smoothing : Applies additional smoothing to the Fisher Transform, reducing noise and providing clearer signals.
Signal Line : Includes a signal line to identify crossover points, indicating potential buy or sell signals.
Custom Alerts : Built-in alert conditions for bullish and bearish crossovers, keeping traders informed of significant market movements.
Visual Enhancements : Background color changes based on crossover conditions, offering immediate visual cues for potential trading opportunities.
How It Works
RSI Calculation : The indicator calculates the Relative Strength Index (RSI) based on the selected source and period length.
Normalization : The RSI values are normalized to fit within a range of -1 to 1, which is essential for the Fisher Transform.
Fisher Transform : The normalized RSI values undergo the Fisher Transform, converting them into a Gaussian normal distribution.
Smoothing : The transformed values are smoothed using a simple moving average to reduce noise and provide more reliable signals.
Signal Line : A signal line, which is a simple moving average of the smoothed Fisher Transform, is plotted to identify crossover points.
Alerts and Visuals : Custom alert conditions are set for bullish and bearish crossovers, and the background color changes to indicate these conditions.
Usage Instructions
Trend Identification : Use the Fisher Transform on RSI to identify overbought and oversold conditions with enhanced precision, aiding in spotting potential trend reversals.
Trade Signals : Monitor the crossovers between the smoothed Fisher Transform and the signal line. A bullish crossover suggests a potential buying opportunity, while a bearish crossover indicates a potential selling opportunity.
Alerts : Set custom alerts based on the built-in conditions to receive notifications when important crossover events occur, ensuring you never miss a trading opportunity.
Visual Cues : Utilize the background color changes to quickly identify bullish (green) and bearish (red) conditions, providing immediate visual feedback on market sentiment.
Complementary Analysis : Combine this indicator with other technical analysis tools and indicators to enhance your overall trading strategy and make more informed decisions.
Comprehensive Market Overview1. What is this indicator about?
The "Comprehensive Market Overview" indicator provides a holistic view of the market by incorporating several key metrics:
Close Price: Displays the current close price below each candle.
Percent from All-Time High: Calculates how far the current close price is from the highest high observed over a specified period.
RSI (Relative Strength Index): Measures the momentum of price movements to assess whether a stock is overbought or oversold.
Volume Gain: Computes the current volume relative to its 20-period simple moving average (SMA), indicating volume strength or weakness.
Volatility: Quantifies market volatility by calculating the ratio of the Bollinger Bands' width (difference between upper and lower bands) to the SMA.
2. How it works?
Close Price Label: This label is displayed below each bar, showing the current close price.
Percent from All-Time High: Calculates the percentage difference between the highest high observed (all-time high) and the current close price.
RSI Calculation: Computes the RSI using a 14-period setting, providing insight into whether a stock is potentially overbought or oversold.
Volume Strength: Computes the current volume divided by its 20-period SMA, indicating whether volume is above or below average.
Volatility Calculation: Calculates the width of the Bollinger Bands (based on a 20-period SMA and 2 standard deviations) and expresses it as a percentage of the SMA, providing a measure of market volatility
3.Correct Trend Identification with Indicators
All-Time High (ATH) Levels:
Low Value (Near ATH): When the percent from ATH is low (close to 0%), it indicates that the current price is near the all-time high zone. This suggests strong bullish momentum and potential resistance levels.
High Value (Below ATH): A high percentage from ATH indicates how much the current price is below the all-time high. This could signal potential support levels or opportunities for price recovery towards previous highs.
RSI (Relative Strength Index):
Overbought (High RSI): RSI values above 70 typically indicate that the asset is overbought, suggesting a potential reversal or correction in price.
Oversold (Low RSI): RSI values below 30 indicate oversold conditions, suggesting a potential rebound or price increase.
Swing Trading Strategies
Confirmation with Visual Analysis: Visualizing the chart to confirm ATH levels and RSI readings can provide strong indications of market sentiment and potential trading opportunities:
Bullish Signals: Look for prices near ATH with RSI confirming strength (not yet overbought), indicating potential continuation or breakout.
Bearish Signals: Prices significantly below ATH with RSI showing weakness (not yet oversold), indicating potential for a bounce or reversal.
Volume Confirmation: Comparing current volume to its SMA helps confirm the strength of price movements. Higher current volume relative to the SMA suggests strong price action.
Volatility Assessment: Monitoring volatility through the Bollinger Bands' width ratio helps assess potential price swings. Narrow bands suggest low volatility, while wide bands indicate higher volatility and potential trading opportunities.
4.Entry and Exit Points:
Entry: Consider entering long positions near support levels when prices are below ATH and RSI is oversold. Conversely, enter short positions near resistance levels when prices are near ATH and RSI is overbought.
Exit: Exit long positions near resistance or ATH levels when prices show signs of resistance or RSI becomes overbought. Exit short positions near support levels or when prices rebound from oversold conditions.
Risk Management: Always incorporate risk management techniques such as setting stop-loss orders based on support and resistance levels identified through ATH and RSI analysis.
Implementation Example
Biquad MACDThis indicator reimagines the traditional MACD by incorporating a biquad band pass filter, offering a refined approach to identifying momentum and trend changes in price data. The standard MACD is essentially a band pass filter, but often it lacks precision. The biquad band pass filter addresses this limitation by providing a more focused frequency range, enhancing the quality of signals.
The MACD Length parameter determines the length of the band pass filter, influencing the frequency range that is isolated. Adjusting this length allows you to focus on different parts of the price movement spectrum.
The Bandwidth (BW) setting controls the width of the frequency band in octaves. It affects the smoothness of the MACD line. A larger bandwidth results in less smooth output, capturing a broader range of frequencies, while a smaller bandwidth focuses on a narrower range, providing a smoother signal.
The Signal Length parameter sets the period for the exponential moving average of the MACD line, which acts as a signal line to identify potential buy and sell points.
Key Features of the Biquad MACD
The MACD is a well-known momentum indicator used to identify changes in the strength, direction, momentum, and duration of a trend in a stock's price. By applying a biquad band pass filter, this version of the MACD provides a more refined and accurate representation of price movements.
The biquad filter offers smooth response and minimal phase distortion, making it ideal for technical analysis. The customizable MACD length and bandwidth allow for flexible adaptation to different trading strategies and market conditions. The signal line smooths the MACD values, providing clear crossover points to indicate potential market entry and exit signals.
The histogram visually represents the difference between the MACD and the signal line, changing colors to indicate rising or falling momentum, which helps in quickly identifying trend changes.
By incorporating the Biquad MACD into your trading toolkit, you can enhance your chart analysis with clearer insights into momentum and trend changes, leading to more informed trading decisions.
Stochastic Biquad Band Pass FilterThis indicator combines the power of a biquad band pass filter with the popular stochastic oscillator to provide a unique tool for analyzing price movements.
The Filter Length parameter determines the center frequency of the biquad band pass filter, affecting which frequency band is isolated. Adjusting this parameter allows you to focus on different parts of the price movement spectrum.
The Bandwidth (BW) controls the width of the frequency band in octaves. It represents the bandwidth between -3 dB frequencies for the band pass filter. A narrower bandwidth results in a more focused filtering effect, isolating a tighter range of frequencies.
The %K Length parameter sets the period for the stochastic calculation, determining the range over which the stochastic values are calculated.
The %K Smoothing parameter applies a simple moving average to the %K values to smooth out the oscillator line.
The %D Length parameter sets the period for the %D line, which is a simple moving average of the %K line, providing a signal line for the oscillator.
Key Features of the Stochastic Biquad Band Pass Filter
Biquad filters are known for their smooth response and minimal phase distortion, making them ideal for technical analysis. In this implementation, the biquad filter is configured as a band pass filter, which allows frequencies within a specified band to pass while attenuating frequencies outside this band. This is particularly useful in trading to isolate specific price movements, making it easier to detect patterns and trends within a targeted frequency range.
The stochastic oscillator is a popular momentum indicator that shows the location of the close relative to the high-low range over a set number of periods. Combining it with a biquad band pass filter enhances its effectiveness by focusing on specific frequency bands of price movements.
By incorporating this stochastic biquad band pass filter into your trading toolkit, you can enhance your chart analysis with clearer insights into specific frequency bands of price movements, leading to more informed trading decisions.
Biquad Band Pass FilterThis indicator utilizes a biquad band pass filter to isolate and highlight a specific frequency band in price data, helping traders focus on price movements within a targeted frequency range.
The Length parameter determines the center frequency of the filter, affecting which frequency band is isolated. Adjusting this parameter allows you to focus on different parts of the price movement spectrum.
The Bandwidth (BW) controls the width of the frequency band in octaves. It represents the bandwidth between -3 dB frequencies for the band pass filter. A narrower bandwidth results in a more focused filtering effect, isolating a tighter range of frequencies.
Key Features of Biquad Filters
Biquad filters are a type of digital filter that provides a combination of low-pass, high-pass, band-pass, and notch filtering capabilities. In this implementation, the biquad filter is configured as a band pass filter, which allows frequencies within a specified band to pass while attenuating frequencies outside this band. This is particularly useful in trading to isolate specific price movements, making it easier to detect patterns and trends within a targeted frequency range.
Biquad filters are known for their smooth response and minimal phase distortion, making them ideal for technical analysis. The customizable length and bandwidth allow for flexible adaptation to different trading strategies and market conditions. Designed for real-time charting, the biquad filter operates efficiently without significant lag, ensuring timely analysis.
By incorporating this biquad band pass filter into your trading toolkit, you can enhance your chart analysis with clearer insights into specific frequency bands of price movements, leading to more informed trading decisions.
Biquad High Pass FilterThis indicator utilizes a biquad high pass filter to filter out low-frequency components from price data, helping traders focus on high-frequency movements and detect rapid changes in trends.
The Length parameter determines the cutoff frequency of the filter, affecting how quickly the filter responds to changes in price. A shorter length allows the filter to react more quickly to high-frequency movements.
The Q Factor controls the sharpness of the filter. A higher Q value results in a more precise filtering effect by narrowing the frequency band. However, be cautious when setting the Q factor too high, as it can induce resonance, amplifying certain frequencies and potentially making the filter less effective by introducing unwanted noise.
Key Features of Biquad Filters
Biquad filters are a type of digital filter that provides a combination of low-pass, high-pass, band-pass, and notch filtering capabilities. In this implementation, the biquad filter is configured as a high pass filter, which allows high-frequency signals to pass while attenuating lower-frequency components. This is particularly useful in trading to highlight rapid price movements, making it easier to spot short-term trends and patterns.
Biquad filters are known for their smooth response and minimal phase distortion, making them ideal for technical analysis. The customizable length and Q factor allow for flexible adaptation to different trading strategies and market conditions. Designed for real-time charting, the biquad filter operates efficiently without significant lag, ensuring timely analysis.
By incorporating this biquad high pass filter into your trading toolkit, you can enhance your chart analysis with clearer insights into rapid price movements, leading to more informed trading decisions.
Internal Bar Strength IBS [Anan]This indicator calculates and displays the Internal Bar Strength (IBS) along with its moving average. The IBS is a measure that represents where the closing price is relative to the high-low range of a given period.
█ Main Formula
The core of this indicator is the Internal Bar Strength (IBS) calculation. The basic IBS formula is:
ibs = (close - low) / (high - low)
I enhanced the original formula by incorporating a user-defined length parameter. This modification allows for greater flexibility in analysis and interpretation. The extended version enables users to adjust the indicator's length according to their specific needs or market conditions. Notably, setting the length parameter to 1 reproduces the behavior of the original formula, maintaining backward compatibility while offering expanded functionality:
ibs = (close - ta.lowest(low, ibs_length)) / (ta.highest(high, ibs_length) - ta.lowest(low, ibs_length))
Where:
- `close` is the closing price of the current bar
- `lowest low` is the lowest low price over the specified IBS length
- `highest high` is the highest high price over the specified IBS length
█ Key Features
- Calculates IBS using a user-defined length
- Applies a moving average to the IBS values
- Offers multiple moving average types
- Includes optional Bollinger Bands or Donchian Channel overlays
- Visualizes bull and bear areas
█ Inputs
- IBS Length: The period used for IBS calculation
- MA Type: The type of moving average applied to IBS (options: SMA, EMA, SMMA, WMA, VWMA, Bollinger Bands, Donchian)
- MA Length: The period used for the moving average calculation
- BB StdDev: Standard deviation multiplier for Bollinger Bands
█ How to Use and Interpret
1. IBS Line Interpretation:
- IBS values range from 0 to 1
- Values close to 1 indicate the close was near the high, suggesting a bullish sentiment
- Values close to 0 indicate the close was near the low, suggesting a bearish sentiment
- Values around 0.5 suggest the close was near the middle of the range
2. Overbought/Oversold Conditions:
- IBS values above 0.8 (teal zone) may indicate overbought conditions
- IBS values below 0.2 (red zone) may indicate oversold conditions
- These zones can be used to identify potential reversal points
3. Trend Identification:
- Consistent IBS values above 0.5 may indicate an uptrend
- Consistent IBS values below 0.5 may indicate a downtrend
4. Using Moving Averages:
- The yellow MA line can help smooth out IBS fluctuations
- Crossovers between the IBS and its MA can signal potential trend changes
5. Bollinger Bands/Donchian Channel:
- When enabled, these can provide additional context for overbought/oversold conditions
- IBS touching or exceeding the upper band may indicate overbought conditions
- IBS touching or falling below the lower band may indicate oversold conditions
Remember that no single indicator should be used in isolation. Always combine IBS analysis with other technical indicators, price action analysis, and broader market context for more reliable trading decisions.
MTF-Colored EMA Difference and Stochastic indicatorThis indicator combines two popular technical analysis tools: the Exponential Moving Average (EMA) and the Stochastic Oscillator, with the added flexibility of analyzing them across multiple time frames. It visually represents the difference between two EMAs and the crossover signals from the Stochastic Oscillator, providing a comprehensive view of the market conditions.
Components:
EMA Difference Histogram :
EMA Calculation : The indicator calculates two EMAs (EMA1 and EMA2) for the selected time frame.
EMA Difference : The difference between EMA1 and EMA2 is plotted as a 4 coloured histogram.
Stochastic Oscillato r:
Calculation : The %K and %D lines of the Stochastic Oscillator are calculated for the selected time frame.
Additional Confirmation via Colors :
Green: %K is above %D, indicating a bullish signal.
Red: %K is below %D, indicating a bearish signal.
Entry and Exit Strategies
Entry Strategy :
Bullish Entry :
Condition 1: The histogram is Dark green (indicating a strong upward trend).
Condition 2: The Stochastic colour is green (%K is above %D).
Bearish Entry :
Condition 1: The histogram is Dark Red (indicating a strong downward trend).
Condition 2: The Stochastic colour is red (%K is below %D).
Exit Strategy:
Bullish Exit:
Condition: The Stochastic colour turns red (%K crosses below %D).
Bearish Exit:
Condition: The Stochastic colour turns green (%K crosses above %D).
Additional Considerations:
Time Frame Selection : The chosen time frame for both the EMA and Stochastic calculations should align with the trader’s strategy (e.g., daily for swing trading, hourly for intraday trading).
Risk Management : Implement stop-loss orders to manage risk effectively. The stop-loss can be placed below the recent swing low for long positions and above the recent swing high for short positions.
Confirmation : Consider using this indicator in conjunction with other technical analysis tools to confirm signals and reduce the likelihood of false entries and exits.
Nebula SAR Echo📈 Overview:
The "Nebula SAR Echo" is a sophisticated technical analysis tool designed for traders seeking enhanced trend detection. This indicator combines the robust Parabolic SAR mechanism with gradient color coding to provide clear visual insights into market trends.
🎯 Key Features:
Advanced Parabolic SAR Calculation:
Utilizes dynamic coefficients for more responsive and accurate trend detection.
Highlights trend reversals with visual markers for immediate identification.
Gradient Color Coding:
Gradient colors dynamically reflect the strength and direction of the trend.
Bullish trends are represented in shades of green, while bearish trends are shown in shades of red.
User-Friendly Customization:
Easily adjustable parameters for acceleration factors and gradient color use.
💡 Benefits:
Enhanced Decision Making:
Combines real-time trend analysis to assist traders in making more informed decisions.
Visual Clarity:
Clear visual markers and gradient color coding simplify the interpretation of market trends.
Helps traders quickly identify key turning points and potential future price paths.
🔍 Use Cases:
Trend Identification:
Ideal for identifying ongoing trends and potential reversals in various market conditions.
Useful for both short-term trading strategies and long-term investment planning.
Risk Management:
Gradient color coding aids in assessing trend strength and potential volatility.
Traders can set more precise stop-loss and take-profit levels based on the trend strength.
⚙️ How to Use:
1. Parameter Setup:
Set the desired acceleration factors (start, increment, and max) for the Parabolic SAR.
Enable or disable gradient colors based on personal preference.
2. Interpretation:
Use the SAR values and gradient colors to gauge current market trends.
3. Alerts:
Set up alert conditions for bullish and bearish reversals to stay notified of significant market changes.
🔹 Conclusion:
The "Nebula SAR Echo" is a versatile and powerful tool for traders who require an in-depth analysis of market trends. By leveraging the advanced Parabolic SAR calculation and gradient color coding, this indicator provides a comprehensive view of market conditions, making it an indispensable addition to any trader's toolkit.
TechniTrend RSI (11TF)Multi-Timeframe RSI Indicator
Overview
The Multi-Timeframe RSI Indicator is a sophisticated tool designed to provide comprehensive insights into the Relative Strength Index (RSI) across 11 different timeframes simultaneously. This indicator is essential for traders who wish to monitor RSI trends and their moving averages (MA) to make informed trading decisions.
Features
Multiple Timeframes: Displays RSI and RSI MA values for 11 different timeframes, allowing traders to have a holistic view of the market conditions.
RSI vs. MA Comparison: Indicates whether the RSI value is above or below its moving average for each timeframe, helping traders to identify bullish or bearish momentum.
Overbought/Oversold Signals:
Marks "OS" (OverSell) when RSI falls below 25, indicating a potential oversold condition.
Marks "OB" (OverBuy) when RSI exceeds 75, signaling a potential overbought condition.
Real-Time Updates: Continuously updates in real-time to provide the most current market information.
Usage
This indicator is invaluable for traders who utilize RSI as part of their technical analysis strategy. By monitoring multiple timeframes, traders can:
Identify key overbought and oversold levels to make entry and exit decisions.
Observe the momentum shifts indicated by RSI crossing above or below its moving average.
Enhance their trading strategy by integrating multi-timeframe analysis for better accuracy and confirmation.
How to Interpret the Indicator
RSI Above MA: Indicates a potential bullish trend. Traders may consider looking for long positions.
RSI Below MA: Suggests a potential bearish trend. Traders may look for short positions.
OS (OverSell): When RSI < 25, the market may be oversold, presenting potential buying opportunities.
OB (OverBuy): When RSI > 75, the market may be overbought, indicating potential selling opportunities.
Filtered MACD with Backtest [UAlgo]The "Filtered MACD with Backtest " indicator is an advanced trading tool designed for the TradingView platform. It combines the Moving Average Convergence Divergence (MACD) with additional filters such as Moving Average (MA) and Average Directional Index (ADX) to enhance trading signals. This indicator aims to provide more reliable entry and exit points by filtering out noise and confirming trends. Additionally, it includes a comprehensive backtesting module to simulate trading strategies and assess their performance based on historical data. The visual backtest module allows traders to see potential trades directly on the chart, making it easier to evaluate the effectiveness of the strategy.
🔶 Customizable Parameters :
Price Source Selection: Users can choose their preferred price source for calculations, providing flexibility in analysis.
Filter Parameters:
MA Filter: Option to use a Moving Average filter with types such as EMA, SMA, WMA, RMA, and VWMA, and a customizable length.
ADX Filter: Option to use an ADX filter with adjustable length and threshold to determine trend strength.
MACD Parameters: Customizable fast length, slow length, and signal smoothing for the MACD indicator.
Backtest Module:
Entry Type: Supports "Buy and Sell", "Buy", and "Sell" strategies.
Stop Loss Types: Choose from ATR-based, fixed point, or X bar high/low stop loss methods.
Reward to Risk Ratio: Set the desired take profit level relative to the stop loss.
Backtest Visuals: Display entry, stop loss, and take profit levels directly on the chart with
colored backgrounds.
Alerts: Configurable alerts for buy and sell signals.
🔶 Filtered MACD : Understanding How Filters Work with ADX and MA
ADX Filter:
The Average Directional Index (ADX) measures the strength of a trend. The script calculates ADX using the user-defined length and applies a threshold value.
Trading Signals with ADX Filter:
Buy Signal: A regular MACD buy signal (crossover of MACD line above the signal line) is only considered valid if the ADX is above the set threshold. This suggests a stronger uptrend to potentially capitalize on.
Sell Signal: Conversely, a regular MACD sell signal (crossunder of MACD line below the signal line) is only considered valid if the ADX is above the threshold, indicating a stronger downtrend for potential shorting opportunities.
Benefits: The ADX filter helps avoid whipsaws or false signals that might occur during choppy market conditions with weak trends.
MA Filter:
You can choose from various Moving Average (MA) types (EMA, SMA, WMA, RMA, VWMA) for the filter. The script calculates the chosen MA based on the user-defined length.
Trading Signals with MA Filter:
Buy Signal: A regular MACD buy signal is only considered valid if the closing price is above the MA value. This suggests a potential uptrend confirmed by the price action staying above the moving average.
Sell Signal: Conversely, a regular MACD sell signal is only considered valid if the closing price is below the MA value. This suggests a potential downtrend confirmed by the price action staying below the moving average.
Benefits: The MA filter helps identify potential trend continuation opportunities by ensuring the price aligns with the chosen moving average direction.
Combining Filters:
You can choose to use either the ADX filter, the MA filter, or both depending on your strategy preference. Using both filters adds an extra layer of confirmation for your signals.
🔶 Backtesting Module
The backtesting module in this script allows you to visually assess how the filtered MACD strategy would have performed on historical data. Here's a deeper dive into its features:
Backtesting Type: You can choose to backtest for buy signals only, sell signals only, or both. This allows you to analyze the strategy's effectiveness in different market conditions.
Stop-Loss Types: You can define how stop-loss orders are placed:
ATR (Average True Range): This uses a volatility measure (ATR) multiplied by a user-defined factor to set the stop-loss level.
Fixed Point: This allows you to specify a fixed dollar amount or percentage value as the stop-loss.
X bar High/Low: This sets the stop-loss at a certain number of bars (defined by the user) above/below the bar's high (for long positions) or low (for short positions).
Reward-to-Risk Ratio: Define the desired ratio between your potential profit and potential loss on each trade. The backtesting module will calculate take-profit levels based on this ratio and the stop-loss placement.
🔶 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.
Consecutive Closes Above/Below 3 SMA with Z-Score BandsA simple indicator that measures consecutive closes above & below the 3-period simple moving average. An upper and lower Z-score has been calculated to indicate where the 4 standard deviations of the last 60 bars sits.
Useful for identifying directional runs in price.
Strength Measurement -HTThe Strength Measurement -HT indicator is a tool designed to measure the strength and trend of a security using the Average Directional Index (ADX) across multiple time frames. This script averages the ADX values from five different time frames to provide a comprehensive view of the trend's strength, helping traders make more informed decisions.
Key Features:
Multi-Time Frame Analysis: The indicator calculates ADX values from five different time frames (5 minutes, 15 minutes, 30 minutes, 1 hour, and 4 hours) to offer a more holistic view of the market trend.
Trend Strength Visualization: The average ADX value is plotted as a histogram, with colors indicating the trend strength and direction, making it easy to visualize and interpret.
Reference Levels: The script includes horizontal lines at ADX levels 25, 50, and 75 to signify weak, strong, and very strong trends, respectively.
How It Works
Directional Movement Calculation: The script calculates the positive and negative directional movements (DI+) and (DI-) using the true range over a specified period (default is 14 periods).
ADX Calculation: The ADX value is derived from the smoothed moving average of the absolute difference between DI+ and DI-, normalized by their sum.
Multi-Time Frame ADX: ADX values are computed for the 5-minute, 15-minute, 30-minute, 1-hour, and 4-hour time frames.
Average ADX: The script averages the ADX values from the different time frames to generate a single, comprehensive ADX value.
Trend Visualization: The average ADX value is plotted as a histogram with colors indicating:
Gray for weak trends (ADX < 25)
Green for strengthening trends (25 ≤ ADX < 50)
Dark Green for strong trends (ADX ≥ 50)
Light Red for weakening trends (ADX < 25)
Red for strong trends turning weak (ADX ≥ 25)
Usage
Trend Detection: Use the color-coded histogram to quickly identify the trend strength and direction. Green indicates a strengthening trend, while red signifies a weakening trend.
Reference Levels: Utilize the horizontal lines at ADX levels 25, 50, and 75 as reference points to gauge the trend's strength.
ADX < 25 suggests a weak trend.
ADX between 25 and 50 indicates a moderate to strong trend.
ADX > 50 points to a very strong trend.
Multi-Time Frame Insight: Leverage the averaged ADX value to gain insights from multiple time frames, helping you make more informed trading decisions based on a broader market perspective.
Feel free to explore and integrate this indicator into your trading strategy to enhance your market analysis and decision-making process. Happy trading!
RSI Trail [UAlgo]The RSI Trail indicator is a technical analysis tool designed to assist traders in making informed decisions by utilizing the Relative Strength Index (RSI) and various moving average calculations. This indicator dynamically plots support and resistance levels based on RSI values, providing visual cues for potential bullish and bearish signals. The inclusion of a trailing stop mechanism allows traders to adapt to market volatility, ensuring optimal entry and exit points.
🔶 Key Features
Multiple Moving Average Types: Choose from Simple Moving Average (SMA), Exponential Moving Average (EMA), Weighted Moving Average (WMA), Running Moving Average (RMA), and McGinley Dynamic for diverse analytical approaches.
Configurable RSI Bounds: Tailor the RSI lower and upper bounds to your specific trading preferences, with default settings at 40 and 60.
Signals: The indicator determines bullish and bearish market states and plots corresponding signals on the chart.
Customizable Visualization: Options to display the midline and color candles based on market state enhance visual analysis.
Alerts: Integrated alert conditions notify you of bullish and bearish signals.
🔶 Calculations
The RSI Trail indicator calculates dynamic support and resistance levels using a combination of moving averages and the Relative Strength Index (RSI). It starts by computing a chosen moving average (SMA, EMA, WMA, RMA, or McGinley) over a period of 27 using the typical price (ohlc4).
The indicator then defines upper and lower bounds based on customizable RSI levels (default 40 and 60) and adjusts these bounds using the Average True Range (ATR) to account for market volatility. The upper bound is calculated by adding a volatility-adjusted value to the moving average, while the lower bound is found by subtracting this value. Bullish signals occur when the price crosses above the upper bound, and bearish signals when it falls below the lower bound.
The RSI Trail indicator also can be used to identify pullback opportunities. When the price high/low crosses above/below the calculated upper/lower bound, it indicates a potential pullback, suggesting a favorable point to enter a trade during a pullback.
🔶 Disclaimer
This indicator is for informational purposes only and should not be considered financial advice.
Always conduct your own research and due diligence before making any trading decisions. Past performance is not necessarily indicative of future results.
RSI Analysis with Statistical Summary Scientific Analysis of the Script "RSI Analysis with Statistical Summary"
Introduction
I observed that there are outliers in the price movement liquidity, and I wanted to understand the RSI value at those points and whether there are any notable patterns. I aimed to analyze this statistically, and this script is the result.
Explanation of Key Terms
1. Outliers in Price Movement Liquidity: An outlier is a data point that significantly deviates from other values. In this context, an outlier refers to an unusually high or low liquidity of price movement, which is the ratio of trading volume to the price difference between the open and close prices. These outliers can signal important market changes or unusual trading activities.
2. RSI (Relative Strength Index): The RSI is a technical indicator that measures the speed and change of price movements. It ranges from 0 to 100 and helps identify overbought or oversold conditions of a trading instrument. An RSI value above 70 indicates an overbought condition, while a value below 30 suggests an oversold condition.
3. Mean: The mean is a measure of the average of a dataset. It is calculated by dividing the sum of all values by the number of values. In this script, the mean of the RSI values is calculated to provide a central tendency of the RSI distribution.
4. Standard Deviation (stdev): The standard deviation is a measure of the dispersion or variation of a dataset. It shows how much the values deviate from the mean. A high standard deviation indicates that the values are widely spread, while a low standard deviation indicates that the values are close to the mean.
5. 68% Confidence Interval: A confidence interval indicates the range within which a certain percentage of values of a dataset lies. The 68% confidence interval corresponds to a range of plus/minus one standard deviation around the mean. It indicates that about 68% of the data points lie within this range, providing insight into the distribution of values.
Overview
This Pine Script™, written in Pine version 5, is designed to analyze the Relative Strength Index (RSI) of a stock or other trading instrument and create statistical summaries of the distribution of RSI values. The script identifies outliers in price movement liquidity and uses this information to calculate the frequency of RSI values. At the end, it displays a statistical summary in the form of a table.
Structure and Functionality of the Script
1. Input Parameters
- `rsi_len`: An integer input parameter that defines the length of the RSI (default: 14).
- `outlierThreshold`: An integer input parameter that defines the length of the outlier threshold (default: 10).
2. Calculating Price Movement Liquidity
- `priceMovementLiquidity`: The volume is divided by the absolute difference between the close and open prices to calculate the liquidity of the price movement.
3. Determining the Boundary for Liquidity and Identifying Outliers
- `liquidityBoundary`: The boundary is calculated using the Exponential Moving Average (EMA) of the price movement liquidity and its standard deviation.
- `outlier`: A boolean value that indicates whether the price movement liquidity exceeds the set boundary.
4. Calculating the RSI
- `rsi`: The RSI is calculated with a period length of 14, using various moving averages (e.g., SMA, EMA) depending on the settings.
5. Storing and Limiting RSI Values
- An array `rsiFrequency` stores the frequency of RSI values from 0 to 100.
- The function `f_limit_rsi` limits the RSI values between 0 and 100.
6. Updating RSI Frequency on Outlier Occurrence
- On an outlier occurrence, the limited and rounded RSI value is updated in the `rsiFrequency` array.
7. Statistical Summary
- Various variables (`mostFrequentRsi`, `leastFrequentRsi`, `maxCount`, `minCount`, `sum`, `sumSq`, `count`, `upper_interval`, `lower_interval`) are initialized to perform statistical analysis.
- At the last bar (`bar_index == last_bar_index`), a loop is run to determine the most and least frequent RSI values and their frequencies. Sum and sum of squares of RSI values are also updated for calculating mean and standard deviation.
- The mean (`mean`) and standard deviation (`stddev`) are calculated. Additionally, a 68% confidence interval is determined.
8. Creating a Table for Result Display
- A table `resultsTable` is created and filled with the results of the statistical analysis. The table includes the most and least frequent RSI values, the standard deviation, and the 68% confidence interval.
9. Graphical Representation
- The script draws horizontal lines and fills to indicate overbought and oversold regions of the RSI.
Interpretation of the Results
The script provides a detailed analysis of RSI values based on specific liquidity outliers. By calculating the most and least frequent RSI values, standard deviation, and confidence interval, it offers a comprehensive statistical summary that can help traders identify patterns and anomalies in the RSI. This can be particularly useful for identifying overbought or oversold conditions of a trading instrument and making informed trading decisions.
Critical Evaluation
1. Robustness of Outlier Identification: The method of identifying outliers is solely based on the liquidity of price movement. It would be interesting to examine whether other methods or additional criteria for outlier identification would lead to similar or improved results.
2. Flexibility of RSI Settings: The ability to select various moving averages and period lengths for the RSI enhances the adaptability of the script, allowing users to tailor it to their specific trading strategies.
3. Visualization of Results: While the tabular representation is useful, additional graphical visualizations, such as histograms of RSI distribution, could further facilitate the interpretation of the results.
In conclusion, this script provides a solid foundation for analyzing RSI values by considering liquidity outliers and enables detailed statistical evaluation that can be beneficial for various trading strategies.
HRC - Hash Rate Capitulation [Da_Prof]The HRC (Hash Rate Capitulation) indicator is a measure of hash rate trend strength. It is the fractional difference between a long and a short simple moving average (SMA) of the bitcoin hash rate. Historically, the 21-day and 105-day SMA work well for this indicator. The hash rate generally increases over time, but when the short SMA crosses below the longer-term SMA, it shows that miners are removing significant hash from the system. This state can be considered a miner "capitulation". Historically, this has marked depressed BTC prices and has led to higher prices within some months. Shout out to foosmoo, the hash rate oscillator indicator prompted this presentation.
Flush Percent RangeFans of Woodies CCI may recognize the approach to this one. This is my attempt at using the same methods but for taking the highs and lows into account without the standard deviation of the CCI. The smoothness of other oscillators may not be ideal however the Williams Percent Range is a fast stochastic that also operates within a channel. This provides an alternative yet still complex view for the virtuoso. A unique feature is total utilization of the weighted moving average, from the standard to the more complex. A fun fact is the Hull Moving Average is actually calculated using weighted moving averages.
How to use:
The base length is for accuracy, the fast length is for catching all the moves(even the wrong ones sometimes.)
The bars back option will not flip the histogram/base trend to its bullish/bearish alternative until the base plot remains on the latter half of the oscillator for a certain number of bars. This can be set to zero if desired.
The factor controls the chop on the various levels. A higher number will increase it.
The oscillator levels are measuring slope, price relative to the average, and a summation of percent changes between the two. Both the baseline/histogram and the levels have color coding for bullishness, bearishness, and indecision(depending on the factor.) The fast line matches the indecision color by default. This is all customizable.
There are many potential ways to trade with this indicator. From hooks back toward the trend and range line crossovers to divergence and reversals. It's important to note the current performance of the oscillator levels. Time cycles may come in handy along with other forecasting tools.
Lastly, there are optional linear regression lines plotted on the chart. They're synchronized to the lengths in the oscillator. This is an additional visual aid to provide context to the direction of the channel.
Overall the Flush Percent Range is for analyzing multiple regression models within a single price channel. No smoothing, fast averages, and specified timeframes of highs/lows. Credit to Larry Williams for the original calculation and Ken Woods for design/methodology inspiration.
RSI DeviationAn oscillator which de-trends the Relative Strength Index. Rather, it takes a moving average of RSI and plots it's standard deviation from the MA, similar to a Bollinger %B oscillator. This seams to highlight short term peaks and troughs, Indicating oversold and overbought conditions respectively. It is intended to be used with a Dollar Cost Averaging strategy, but may also be useful for Swing Trading, or Scalping on lower timeframes.
When the line on the oscillator line crosses back into the channel, it signals a trade opportunity.
~ Crossing into the band from the bottom, indicates the end of an oversold condition, signaling a potential reversal. This would be a BUY signal.
~ Crossing into the band from the top, indicates the end of an overbought condition, signaling a potential reversal. This would be a SELL signal.
For ease of use, I've made the oscillator highlight the main chart when Overbought/Oversold conditions are occurring, and place fractals upon reversion to the Band. These repaint as they are calculated at close. The earliest trade would occur upon open of the following day.
I have set the default St. Deviation to be 2, but in my testing I have found 1.5 to be quite reliable. By decreasing the St. Deviation you will increase trade frequency, to a point, at the expense of efficiency.
Cheers
DJSnoWMan06
ADX with Donchian Channels
The "ADX with Donchian Channels" indicator combines the Average Directional Index (ADX) with Donchian Channels to provide traders with a powerful tool for identifying trends and potential breakouts.
Features:
Average Directional Index (ADX):
The ADX is used to quantify the strength of a trend. It helps traders determine whether a market is trending or ranging.
Adjustable parameters for ADX smoothing and DI length allow traders to fine-tune the sensitivity of the trend strength measurement.
Donchian Channels on ADX:
Donchian Channels are applied directly to the ADX values to highlight the highest high and lowest low of the ADX over a specified period.
The upper and lower Donchian Channels can signal potential trend breakouts when the ADX value moves outside these bounds.
The middle Donchian Channel provides a reference for the average trend strength.
Visualization:
The indicator plots the ADX line in red to clearly display the trend strength.
The upper and lower Donchian Channels are plotted in blue, with a green middle line to represent the average.
The area between the upper and lower Donchian Channels is filled with a blue shade to visually emphasize the range of ADX values.
Default Settings for Scalping:
Donchian Channel Length: 10
Standard Deviation Multiplier: 1.58
ADX Length: 2
ADX Smoothing Length: 2
These default settings are optimized for scalping, offering a quick response to changes in trend strength and potential breakout signals. However, traders can adjust these settings to suit different trading styles and market conditions.
How to Use:
Trend Strength Identification: Use the ADX line to identify the strength of the current trend. Higher ADX values indicate stronger trends.
Breakout Signals: Monitor the ADX value in relation to the Donchian Channels. A breakout above the upper channel or below the lower channel can signal a potential trend continuation or reversal.
Range Identification: The filled area between the Donchian Channels provides a visual representation of the ADX range, helping traders identify when the market is ranging or trending.
This indicator is designed to enhance your trading strategy by combining trend strength measurement with breakout signals, making it a versatile tool for various market conditions.
Glitch IndexGlitch Index is an oscillator from an unknown origin that is discovered in 2013 as a lua indicator taken from MetaStock days and we are not really sure how far back the original idea goes.
How it Works?
As I found this indicator and looking at it's code in different platform I can see it comes back from a basic idea of getting a price value, calculating it's smoothed average with a set multiplier and getting the difference then presenting it on a simplified scale. It appears to be another interpretation of figuring out price acceleration and velocity. The main logic is calculated as below:
price = priceSet(priceType)
_ma = getAverageName(price, MaMethod, MaPeriod)
rocma = ((_ma - _ma ) * 0.1) + 1
maMul = _ma * rocma
diff = price - maMul
gli_ind = (diff / price) * -10
How to Use?
Glitch Index can be used based on different implementations and along with your already existing trading system as a confirmation. Yoıu can use it as a Long signal when the histogram crosses inner levels or you can use it as an overbough and oversold signals when the histogram crosses above outter levels and gets back in the range between outter and inner levels.
You can customise the settings and set your prefered inner and outter levels in indicator settings along with gradient or static based coloring and modify the code as you see fit. The coloring code is set below:
gli_col = gli_ind > outterLevel ? color.green : gli_ind < -outterLevel ? color.red : gli_ind > innerLevel ? color.rgb(106, 185, 109, 57) : gli_ind < -innerLevel ? color.rgb(233, 111, 111, 40) : color.new(color.yellow, 60)
gradcol = color.from_gradient(gli_ind, -outterLevel, outterLevel, color.red, color.green)
colorSelect = colorType == "Gradient" ? gradcol : gli_col