Uptrick: Dual Moving Average Volume Oscillator
Title: Uptrick: Dual Moving Average Volume Oscillator (DPVO)
### Overview
The "Uptrick: Dual Moving Average Volume Oscillator" (DPVO) is an advanced trading tool designed to enhance market analysis by integrating volume data with price action. This indicator is specially developed to provide traders with deeper insights into market dynamics, making it easier to spot potential entry and exit points based on volume and price interactions. The DPVO stands out by offering a sophisticated approach to traditional volume analysis, setting it apart from typical volume indicators available on the TradingView platform.
### Unique Features
Unlike traditional indicators that analyze volume and price movements separately, the DPVO combines these two critical elements to offer a comprehensive view of market behavior. By calculating the Volume Impact, which involves the product of the exponential moving averages (EMAs) of volume and the price range (close - open), this indicator highlights significant trading activities that could indicate strong buying or selling pressure. This method allows traders to see not just the volume spikes, but how those spikes relate to price movements, providing a clearer picture of market sentiment.
### Customization and Inputs
The DPVO is highly customizable, catering to various trading styles and strategies:
- **Oscillator Length (`oscLength`)**: Adjusts the period over which the volume and price difference is analyzed, allowing traders to set it according to their trading timeframe.
- **Fast and Slow Moving Averages (`fastMA` and `slowMA`)**: These parameters control the responsiveness of the DPVO. A shorter `fastMA` coupled with a longer `slowMA` can help in identifying trends quicker or smoothing out market noise for more conservative approaches.
- **Signal Smoothing (`signalSmooth`)**: This input helps in reducing signal noise, making the crossover and crossunder points between the DVO and its smoothed signal line clearer and easier to interpret.
### Functionality Details
The DPVO operates through a sequence of calculated steps that integrate volume data with price movement:
1. **Volume Impact Calculation**: This is the foundational step where the product of the EMA of volume and the EMA of price range (close - open) is calculated. This metric highlights trading sessions where significant volume accompanies substantial price movements, suggesting a strong market response.
2. **Dynamic Volume Oscillator (DVO)**: The heart of the indicator, the DVO, is derived by calculating the difference between the fast EMA and the slow EMA of the Volume Impact. This result is then normalized by dividing by the EMA of the volume over the same period to scale the output, making it consistent across various trading environments.
3. **Signal Generation**: The final output is smoothed using a simple moving average of the DVO to filter out market noise. Buy and sell signals are generated based on the crossover and crossunder of the DVO with its smoothed version, providing clear cues for market entry or exit.
### Originality
The DPVO's originality lies in its innovative integration of volume and price movement, a novel approach not typically observed in other volume indicators. By analyzing the product of volume and price change EMAs, the DPVO captures the essence of market dynamics more holistically than traditional tools, which often only reflect volume levels without contextualizing them with price actions. This dual analysis provides traders with a deeper understanding of market forces, enabling them to make more informed decisions based on a combination of volume surges and significant price movements. The DPVO also introduces a unique normalization and smoothing technique that refines the oscillator's output, offering cleaner and more reliable signals that are adaptable to various market conditions and trading styles.
### Practical Application
The DPVO excels in environments where volume plays a crucial role in validating price movements. Traders can utilize the buy and sell signals generated by the DPVO to enhance their decision-making process. The signals are plotted directly on the trading chart, with buy signals appearing below the price bars and sell signals above, ensuring they are prominent and actionable. This setup is particularly useful for day traders and swing traders who rely on timely and accurate signals to maximize their trading opportunities.
### Best Practices
To maximize the effectiveness of the DPVO, traders should consider the following best practices:
- **Market Selection**: Use the DPVO in markets known for strong volume-price correlation such as major forex pairs, popular stocks, and cryptocurrencies.
- **Signal Confirmation**: While the DPVO provides powerful signals, confirming these signals with additional indicators such as RSI or MACD can increase trade reliability.
- **Risk Management**: Always use stop-loss orders to manage risks associated with trading signals. Adjust the position size based on the volatility of the asset to avoid significant losses.
### Practical Example + How to use it
Practical Example1: Day Trading Cryptocurrencies
For a day trader focusing on the highly volatile cryptocurrency market, the DPVO can be an effective tool on a 15-minute chart. Suppose a trader is monitoring Bitcoin (BTC) during a period of high market activity. The DPVO might show an upward crossover of the DVO above its smoothed signal line while also indicating a significant increase in volume. This could signal that strong buying pressure is entering the market, suggesting a potential short-term rally. The trader could enter a long position based on this signal, setting a stop-loss just below the recent support level to manage risk. If the DPVO later shows a crossover in the opposite direction with decreasing volume, it might signal a good exit point, allowing the trader to lock in profits before a potential pullback.
- **Swing Trading Stocks**: For a swing trader looking at stocks, the DPVO could be applied on a daily chart. If the oscillator shows a consistent downward trend along with increasing volume, this could suggest a potential sell-off, providing a sell signal before a significant downturn.
You can look for:
--> Increase in volume - You can use indicators like 24-hour-Volume to have a better visualization
--> Uptrend/Downtrend in the indicator (HH, HL, LL, LH)
--> Confirmation (Buy signal/Sell signal)
--> Correct Price action (Not too steep moves up or down. Stable moves.) (Optional)
--> Confirmation with other indicators (Optional)
Quick image showing you an example of a buy signal on SOLANA:
### Technical Notes
- **Calculation Efficiency**: The DPVO utilizes exponential moving averages (EMAs) in its calculations, which provides a balance between responsiveness and smoothing. EMAs are favored over simple moving averages in this context because they give more weight to recent data, making the indicator more sensitive to recent market changes.
- **Normalization**: The normalization of the DVO by the EMA of the volume ensures that the oscillator remains consistent across different assets and timeframes. This means the indicator can be used on a wide variety of markets without needing significant adjustments, making it a versatile tool for traders.
- **Signal Line Smoothing**: The final signal line is smoothed using a simple moving average (SMA) to reduce noise. The choice of SMA for smoothing, as opposed to EMA, is intentional to provide a more stable signal that is less prone to frequent whipsaws, which can occur in highly volatile markets.
- **Lag and Sensitivity**: Like all moving average-based indicators, the DPVO may introduce a slight lag in signal generation. However, this is offset by the indicator’s ability to filter out market noise, making it a reliable tool for identifying genuine trends and reversals. Adjusting the `fastMA`, `slowMA`, and `signalSmooth` inputs allows traders to fine-tune the sensitivity of the DPVO to match their specific trading strategy and market conditions.
- **Platform Compatibility**: The DPVO is written in Pine Script™ v5, ensuring compatibility with the latest features and functionalities offered by TradingView. This version takes advantage of optimized functions for performance and accuracy in calculations, making it well-suited for real-time analysis.
Conclusion
The "Uptrick: Dual Moving Average Volume Oscillator" is a revolutionary tool that merges volume analysis with price movement to offer traders a more nuanced understanding of market trends and reversals. Its ability to provide clear, actionable signals based on a unique combination of volume and price changes makes it an invaluable addition to any trader's toolkit. Whether you are managing long-term positions or looking for quick trades, the DPVO provides insights that can help refine any trading strategy, making it a standout choice in the crowded field of technical indicators.
Nothing from this indicator or any other Uptrick Indicators is financial advice. Only you are ultimately responsible for your choices.
"swing trading"に関するスクリプトを検索
Modern Trend IdentifierThis is an update by Lightangel112 to Trendilo (Open-Source).
Thanks @ Lightangel112
The Modern Trend Identifier (MTI) is a sophisticated technical analysis tool designed for traders and analysts seeking to accurately determine market trends. This indicator leverages the Arnaud Legoux Moving Average (ALMA) to smooth price data and calculate percentage changes, providing a clearer and more responsive trend analysis. MTI is engineered to highlight trend direction with visual cues, fill areas between the indicator and its bands, and color bars based on trend direction, making it a powerful tool for identifying market momentum and potential reversals.
Capabilities
Smoothing and Trend Calculation:
Utilizes ALMA to smooth price data, reducing noise and providing a clearer view of the trend.
Calculates percentage changes in price over a user-defined lookback period.
Dynamic Range Adjustment:
Normalizes the ALMA percentage change values to ensure they stay within a -100 to 100 range.
Uses a combination of linear and smoothstep compression to handle extreme values without losing sensitivity.
Trend Direction and Highlighting:
Determines the trend direction based on the relationship between the smoothed ALMA percentage change and dynamically adjusted RMS (Root Mean Square) bands.
Colors the trend line to visually indicate whether the market is in an uptrend, downtrend, or neutral state.
Dynamic Threshold Calculation:
Calculates dynamic thresholds using percentile ranks to adapt to changing market conditions.
Visualization Enhancements:
Fills areas between the ALMA percentage change line and its RMS bands to provide a clear visual indication of the trend strength.
Offers the option to color price bars based on the identified trend direction.
Customizable Settings:
Provides extensive customization options for lookback periods, smoothing parameters, ALMA settings, band multipliers, and more.
Allows users to enable or disable various visual enhancements and customize their appearance.
Use Cases
Trend Identification:
MTI helps traders identify the current market trend, whether it's bullish, bearish, or neutral. This can be particularly useful for trend-following strategies.
Momentum Analysis:
By highlighting areas of strong momentum, MTI enables traders to spot potential breakouts or breakdowns. This can be useful for both entry and exit decisions.
Support and Resistance Levels:
The dynamic threshold bands can act as support and resistance levels. Traders can use these levels to set stop-loss and take-profit orders.
Divergence Detection:
MTI can help in identifying divergences between price and the indicator, which can signal potential trend reversals. This is useful for traders looking to capitalize on trend changes.
Risk Management:
The fill areas and colored bars provide clear visual cues about trend strength and direction, aiding in better risk management. Traders can adjust their positions based on the strength of the trend.
Backtesting:
The extensive customization options allow traders to backtest different settings and parameters to optimize their trading strategies for various market conditions.
Multiple Timeframes:
MTI can be applied to multiple timeframes, from intraday charts to daily, weekly, or monthly charts, making it a versatile tool for traders with different trading styles.
Example Scenarios
Day Trading:
A day trader can use MTI on a 5-minute chart to identify intraday trends. By adjusting the lookback period and smoothing parameters, the trader can quickly spot potential entry and exit points based on short-term momentum changes.
Swing Trading:
A swing trader might apply MTI to a 4-hour chart to identify medium-term trends. The dynamic thresholds can help in setting appropriate stop-loss levels, while the trend direction highlighting aids in making informed decisions about holding or exiting positions.
Position Trading:
For a position trader using a daily chart, MTI can help identify the overarching trend. The trader can use the fill areas and bar coloring to assess the strength of the trend and make decisions about entering or exiting long-term positions.
Market Analysis:
An analyst could use MTI to study historical price movements and identify patterns. By examining how the indicator reacted to past market conditions, the analyst can gain insights into potential future price movements.
In summary, the Modern Trend Identifier (MTI) is a versatile and powerful tool that enhances trend analysis with advanced smoothing techniques, dynamic adjustments, and comprehensive visual cues. It is designed to meet the needs of traders and analysts across various trading styles and timeframes, providing clear and actionable insights into market trends and momentum.
Updated with the following:
Additions and Enhancements in MTI
Grouped Inputs with Descriptive Tooltips:
Inputs are organized into groups for better clarity.
Each input parameter includes a descriptive tooltip.
Dynamic Threshold Calculation:
Added dynamic threshold calculation using percentile ranks to adapt to changing market conditions.
Normalization and Compression:
Added normalization factor to ensure plots are within -100 to 100 range.
Introduced smoothstep function for smooth transition and selectively applied linear and smoothstep compression to values outside -80 to 100 range.
Enhanced Visualization:
Highlighted trend direction with RGB colors.
Enhanced fill areas between the ALMA percentage change line and its RMS bands.
Colored price bars based on the identified trend direction.
RMS Lines Adjustment:
Dynamically adjusted RMS calculation without strict capping.
Ensured RMS lines stay below fill areas to maintain clarity.
Descriptive and Organized Code:
Enhanced code clarity with detailed comments.
Organized code into logical sections for better readability and maintenance.
Key Differences and Improvements.
Input Customization:
Trendilo: Inputs are simple and ungrouped.
MTI: Inputs are grouped and include tooltips for better user guidance.
Trend Calculation:
Trendilo: Uses ALMA and calculates percentage change.
MTI: Enhanced with normalization, compression, and dynamic threshold calculation.
Normalization and Compression:
Trendilo: No normalization or compression applied.
MTI: Normalizes values to -100 to 100 range and applies smoothstep compression to handle extreme values.
Dynamic RMS Adjustment:
Trendilo: Simple RMS calculation.
MTI: Dynamically adjusted RMS calculation to ensure clarity in visualization.
Visual Enhancements:
Trendilo: Basic trend highlighting and filling.
MTI: Enhanced visual cues with RGB colors, dynamic threshold bands, and improved fill areas.
Code Clarity:
Trendilo: Functional but lacks detailed comments and organization.
MTI: Well-organized, extensively commented code for better readability and maintainability.
Weekly Open to Close Percentage ChangeThe "Weekly Open to Close Percentage Change Indicator" is a powerful tool designed to help traders and investors track the percentage change in price from the open of the current week's candle to its close. This indicator provides a clear visualization of how the price has moved within the week, offering valuable insights into weekly market trends and momentum.
Key Features:
Weekly Analysis: Focuses on weekly time frames, making it ideal for swing traders and long-term investors.
Percentage Change Calculation: Accurately calculates the percentage change from the open price of the current week's candle to the close price.
Color-Coded Visualization: Uses color coding to differentiate between positive and negative changes:
Green for positive percentage changes (price increase).
Red for negative percentage changes (price decrease).
Histogram Display: Plots the percentage change as a histogram for easy visual interpretation.
Background Highlighting: Adds a background color with transparency to highlight the nature of the change, enhancing chart readability.
Optional Labels: Includes an option to display percentage change values as small dots at the top for quick reference.
How to Use:
Add the script to your TradingView chart by opening the Pine Editor, pasting the script, and saving it.
Apply the indicator to your chart. It will automatically calculate and display the weekly percentage change.
Use the color-coded histogram and background to quickly assess weekly price movements and make informed trading decisions.
Use Cases:
Trend Identification: Quickly identify whether the market is trending upwards or downwards on a weekly basis.
Market Sentiment: Gauge the market sentiment by observing the weekly price changes.
Swing Trading: Ideal for swing traders who base their strategies on weekly price movements.
Note: This indicator is designed for educational and informational purposes. Always conduct thorough analysis and consider multiple indicators and factors when making trading decisions.
Adaptive Moving Average (AMA) Signals (Zeiierman)█ Overview
The Adaptive Moving Average (AMA) Signals indicator, enhances the classic concept of moving averages by making them adaptive to the market's volatility. This adaptability makes the AMA particularly useful in identifying market trends with varying degrees of volatility.
The core of the AMA's adaptability lies in its Efficiency Ratio (ER), which measures the directionality of the market over a given period. The ER is calculated by dividing the absolute change in price over a period by the sum of the absolute differences in daily prices over the same period.
⚪ Why It's Useful
The AMA Signals indicator is particularly useful because of its adaptability to changing market conditions. Unlike static moving averages, it dynamically adjusts, providing more relevant signals that can help traders capture trends earlier or identify reversals with greater accuracy. Its configurability makes it suitable for various trading strategies and timeframes, from day trading to swing trading.
█ How It Works
The AMA Signals indicator operates on the principle of adapting to market efficiency through the calculation of the Efficiency Ratio (ER), which measures the directionality of the market over a specified period. By comparing the net price change to total price movements, the AMA adjusts its sensitivity, becoming faster during trending markets and slower during sideways markets. This adaptability is enhanced by a gamma parameter that filters signals for either trend continuation or reversal, making it versatile across different market conditions.
change = math.abs(close - close )
volatility = math.sum(math.abs(close - close ), n)
ER = change / volatility
Efficiency Ratio (ER) Calculation: The AMA begins with the computation of the Efficiency Ratio (ER), which measures the market's directionality over a specified period. The ER is a ratio of the net price change to the total price movements, serving as a measure of the efficiency of price movements.
Adaptive Smoothing: Based on the ER, the indicator calculates the smoothing constants for the fastest and slowest Exponential Moving Averages (EMAs). These constants are then used to compute a Scaled Smoothing Coefficient (SC) that adapts the moving average to the market's efficiency, making it faster during trending periods and slower in sideways markets.
Signal Generation: The AMA applies a filter, adjusted by a "gamma" parameter, to identify trading signals. This gamma influences the sensitivity towards trend or reversal signals, with options to adjust for focusing on either trend-following or counter-trend signals.
█ How to Use
Trend Identification: Use the AMA to identify the direction of the trend. An upward moving AMA indicates a bullish trend, while a downward moving AMA suggests a bearish trend.
Trend Trading: Look for buy signals when the AMA is trending upwards and sell signals during a downward trend. Adjust the fast and slow EMA lengths to match the desired sensitivity and timeframe.
Reversal Trading: Set the gamma to a positive value to focus on reversal signals, identifying potential market turnarounds.
█ Settings
Period for ER calculation: Defines the lookback period for calculating the Efficiency Ratio, affecting how quickly the AMA responds to changes in market efficiency.
Fast EMA Length and Slow EMA Length: Determine the responsiveness of the AMA to recent price changes, allowing traders to fine-tune the indicator to their trading style.
Signal Gamma: Adjusts the sensitivity of the filter applied to the AMA, with the ability to focus on trend signals or reversal signals based on its value.
AMA Candles: An innovative feature that plots candles based on the AMA calculation, providing visual cues about the market trend and potential reversals.
█ Alerts
The AMA Signals indicator includes configurable alerts for buy and sell signals, as well as positive and negative trend changes.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
Candlestick Bias OscillatorCandlestick Bias Oscillator (CBO)
The Candlestick Bias Oscillator (CBO) with Signal Line is a pioneering indicator developed for the TradingView platform, designed to offer traders a nuanced analysis of market sentiment through the unique lens of candlestick patterns. This indicator stands out by merging traditional concepts of price action analysis with innovative mathematical computations, providing a fresh perspective on trend detection and potential market reversals.
Originality and Utility
At the core of the CBO's originality is its method of calculating the bias of candlesticks. Unlike conventional oscillators that may rely solely on closing prices or high-low ranges, the CBO incorporates both the body and wick of candlesticks into its analysis. This dual consideration allows for a more rounded understanding of market sentiment, capturing both the directional momentum and the strength of price rejections within a single oscillator.
Mathematical Foundations
1. Body Bias: The CBO calculates the body bias by assessing the relative position of the close to the open within the day's range, scaled to a -100 to 100 range. This calculation reflects the bullish or bearish sentiment of the market, based on the day's closing momentum.
Body Bias = (Close−Open)/(High−Low) x 100
Wick Bias: Similarly, the wick bias calculation takes into account the lengths of the upper and lower wicks, indicating rejection levels beyond the body's close. The balance between these wicks is scaled similarly to the body bias, offering insight into the market's indecision or rejection of certain price levels.
Wick Bias=(Lower Wick−Upper Wick)/(Total Wick Length) × 100
3. Overall Bias and Oscillator: By averaging the body and wick biases, the CBO yields an overall bias score, which is then smoothed over a user-defined period to create the oscillator. This oscillator provides a clear visual representation of the market's underlying sentiment, smoothed to filter out the noise.
4. Signal Line: A secondary smoothing of the oscillator creates the signal line, offering a trigger for potential trading signals when the oscillator crosses this line, indicative of a change in market momentum.
How to Use the CBO:
The CBO is versatile, suitable for various trading strategies, including scalping, swing trading, and long-term trend following. Traders can use the oscillator and signal line crossovers as indications for entry or exit points. The relative position of the oscillator to the zero line further provides insight into the prevailing market bias, enabling traders to align their strategies with the broader market sentiment.
Why It Adds Value:
The CBO's innovative approach to analyzing candlestick patterns fills a gap in the existing array of TradingView indicators. By providing a detailed analysis of both candle bodies and wicks, the CBO offers a more comprehensive view of market sentiment than traditional oscillators. This can be particularly useful for traders looking to gauge the strength of price movements and potential reversal points with greater precision.
Conclusion:
The Candle Bias Oscillator with Signal Line is not just another addition to the plethora of indicators on TradingView. It represents a significant advancement in the analysis of market sentiment, combining traditional concepts with a novel mathematical approach. By offering a deeper insight into the dynamics of candlestick patterns, the CBO equips traders with a powerful tool to navigate the complexities of the market with increased confidence.
Explore the unique insights provided by the CBO and integrate it into your trading strategy for a more informed and nuanced market analysis.
Bollinger Bands & Fibonacci StrategyThe Bollinger Bands & Fibonacci Strategy is a powerful technical analysis trading strategy designed to identify potential entry and exit points in financial markets. This strategy combines two widely used indicators, Bollinger Bands and Fibonacci retracement levels, to assist traders in making informed trading decisions.
Key Features:
Bollinger Bands: This strategy utilizes Bollinger Bands, a volatility-based indicator that consists of an upper band, a lower band, and a middle (basis) line. Bollinger Bands help traders visualize price volatility and potential reversal points.
Fibonacci Retracement Levels: Fibonacci retracement levels are essential tools for identifying potential support and resistance levels in price charts. This strategy incorporates Fibonacci retracement levels, including the 0% and 100% levels, to aid in pinpointing key price levels.
Long and Short Signals: The strategy generates long (buy) and short (sell) signals based on specific conditions derived from Bollinger Bands and Fibonacci levels. Long signals are generated when price crosses above the upper Bollinger Band and when the price is above the Fibonacci low level. Short signals are generated when price crosses below the lower Bollinger Band and when the price is below the Fibonacci high level.
Position Management: To prevent multiple concurrent positions of the same type (long or short), the strategy employs position management logic. It tracks open positions and ensures that only one position type is active at a time.
Exit Conditions: The strategy includes customizable exit conditions to manage and close open positions. Traders can fine-tune exit criteria to align with their risk management and profit-taking strategies.
User-Friendly: This strategy script is user-friendly and can be easily integrated into the TradingView platform, allowing traders to apply it to various financial instruments and timeframes.
Usage:
Traders and investors can apply the Bollinger Bands & Fibonacci Strategy to a wide range of financial markets, including stocks, forex, commodities, and cryptocurrencies. It can be adapted to different timeframes to suit various trading styles, from day trading to swing trading.
Disclaimer:
Trading carries inherent risks, and this strategy is no exception. It is essential to use proper risk management techniques, including stop-loss orders, and thoroughly backtest the strategy on historical data before implementing it in live trading.
The Bollinger Bands & Fibonacci Strategy is a valuable tool for technical traders seeking well-defined entry and exit points based on robust indicators. It can serve as a foundation for traders to build and customize their trading strategies according to their individual preferences and risk tolerance.
Feel free to customize this description to add any additional details or specifications unique to your strategy. When publishing your strategy on a trading platform like TradingView, a clear and informative description can help potential users understand and use your strategy effectively.
W and M Pattern Indicator- SwaGThis is a TradingView indicator script that identifies potential buy and sell signals based on ‘W’ and ‘M’ patterns in the Relative Strength Index (RSI). It provides visual alerts and draws horizontal lines to indicate potential trade entry points.
User Manual:
Inputs: The script takes two inputs - an upper limit and a lower limit. The default values are 70 and 40, respectively.
RSI Calculation: The script calculates the RSI based on the closing prices of the last 14 periods.
Pattern Identification: It identifies ‘W’ patterns when the RSI makes a higher low within the lower limit, and ‘M’ patterns when the RSI makes a lower high within the upper limit.
Visual Alerts: The script plots these patterns on the chart. ‘W’ patterns are marked with small green triangles below the bars, and ‘M’ patterns are marked with small red triangles above the bars.
Trade Entry Points: A horizontal line is drawn at the high or low of the candle to represent potential trade entry points. The line starts from one bar to the left and extends 10 bars to the right.
Trading Strategy:
For investing, use a weekly timeframe.
For swing trading, use a daily timeframe.
For intraday trading, use a 5 or 15-minute timeframe. Only consider sell-side signals for intraday trading.
Take a buy position if the high breaks above the green line or sell if the low breaks below the red line.
Use recent signals only and avoid signals that are too old.
Swing highs or lows will be your stop-loss level.
Always think about your stop-loss before entering a trade, not your target.
Avoid trades with a large stop-loss.
Remember, this script is a tool to aid in your trading decisions. Always test your strategies thoroughly before live trading. Happy trading! 😊
Moving Average Filters Add-on w/ Expanded Source Types [Loxx]Moving Average Filters Add-on w/ Expanded Source Types is a conglomeration of specialized and traditional moving averages that will be used in most of indicators that I publish moving forward. There are 39 moving averages included in this indicator as well as expanded source types including traditional Heiken Ashi and Better Heiken Ashi candles. You can read about the expanded source types clicking here . About half of these moving averages are closed source on other trading platforms. This indicator serves as a reference point for future public/private, open/closed source indicators that I publish to TradingView. Information about these moving averages was gleaned from various forex and trading forums and platforms as well as TASC publications and other assorted research publications.
________________________________________________________________
Included moving averages
ADXvma - Average Directional Volatility Moving Average
Linnsoft's ADXvma formula is a volatility-based moving average, with the volatility being determined by the value of the ADX indicator.
The ADXvma has the SMA in Chande's CMO replaced with an EMA, it then uses a few more layers of EMA smoothing before the "Volatility Index" is calculated.
A side effect is, those additional layers slow down the ADXvma when you compare it to Chande's Variable Index Dynamic Average VIDYA.
The ADXVMA provides support during uptrends and resistance during downtrends and will stay flat for longer, but will create some of the most accurate market signals when it decides to move.
Ahrens Moving Average
Richard D. Ahrens's Moving Average promises "Smoother Data" that isn't influenced by the occasional price spike. It works by using the Open and the Close in his formula so that the only time the Ahrens Moving Average will change is when the candlestick is either making new highs or new lows.
Alexander Moving Average - ALXMA
This Moving Average uses an elaborate smoothing formula and utilizes a 7 period Moving Average. It corresponds to fitting a second-order polynomial to seven consecutive observations. This moving average is rarely used in trading but is interesting as this Moving Average has been applied to diffusion indexes that tend to be very volatile.
Double Exponential Moving Average - DEMA
The Double Exponential Moving Average (DEMA) combines a smoothed EMA and a single EMA to provide a low-lag indicator. It's primary purpose is to reduce the amount of "lagging entry" opportunities, and like all Moving Averages, the DEMA confirms uptrends whenever price crosses on top of it and closes above it, and confirms downtrends when the price crosses under it and closes below it - but with significantly less lag.
Double Smoothed Exponential Moving Average - DSEMA
The Double Smoothed Exponential Moving Average is a lot less laggy compared to a traditional EMA. It's also considered a leading indicator compared to the EMA, and is best utilized whenever smoothness and speed of reaction to market changes are required.
Exponential Moving Average - EMA
The EMA places more significance on recent data points and moves closer to price than the SMA (Simple Moving Average). It reacts faster to volatility due to its emphasis on recent data and is known for its ability to give greater weight to recent and more relevant data. The EMA is therefore seen as an enhancement over the SMA.
Fast Exponential Moving Average - FEMA
An Exponential Moving Average with a short look-back period.
Fractal Adaptive Moving Average - FRAMA
The Fractal Adaptive Moving Average by John Ehlers is an intelligent adaptive Moving Average which takes the importance of price changes into account and follows price closely enough to display significant moves whilst remaining flat if price ranges. The FRAMA does this by dynamically adjusting the look-back period based on the market's fractal geometry.
Hull Moving Average - HMA
Alan Hull's HMA makes use of weighted moving averages to prioritize recent values and greatly reduce lag whilst maintaining the smoothness of a traditional Moving Average. For this reason, it's seen as a well-suited Moving Average for identifying entry points.
IE/2 - Early T3 by Tim Tilson
The IE/2 is a Moving Average that uses Linear Regression slope in its calculation to help with smoothing. It's a worthy Moving Average on it's own, even though it is the precursor and very early version of the famous "T3 Indicator".
Integral of Linear Regression Slope - ILRS
A Moving Average where the slope of a linear regression line is simply integrated as it is fitted in a moving window of length N (natural numbers in maths) across the data. The derivative of ILRS is the linear regression slope. ILRS is not the same as a SMA (Simple Moving Average) of length N, which is actually the midpoint of the linear regression line as it moves across the data.
Instantaneous Trendline
The Instantaneous Trendline is created by removing the dominant cycle component from the price information which makes this Moving Average suitable for medium to long-term trading.
Laguerre Filter
The Laguerre Filter is a smoothing filter which is based on Laguerre polynomials. The filter requires the current price, three prior prices, a user defined factor called Alpha to fill its calculation.
Adjusting the Alpha coefficient is used to increase or decrease its lag and it's smoothness.
Leader Exponential Moving Average
The Leader EMA was created by Giorgos E. Siligardos who created a Moving Average which was able to eliminate lag altogether whilst maintaining some smoothness. It was first described during his research paper "MACD Leader" where he applied this to the MACD to improve its signals and remove its lagging issue. This filter uses his leading MACD's "modified EMA" and can be used as a zero lag filter.
Linear Regression Value - LSMA (Least Squares Moving Average)
LSMA as a Moving Average is based on plotting the end point of the linear regression line. It compares the current value to the prior value and a determination is made of a possible trend, eg. the linear regression line is pointing up or down.
Linear Weighted Moving Average - LWMA
LWMA reacts to price quicker than the SMA and EMA. Although it's similar to the Simple Moving Average, the difference is that a weight coefficient is multiplied to the price which means the most recent price has the highest weighting, and each prior price has progressively less weight. The weights drop in a linear fashion.
McGinley Dynamic
John McGinley created this Moving Average to track price better than traditional Moving Averages. It does this by incorporating an automatic adjustment factor into its formula, which speeds (or slows) the indicator in trending, or ranging, markets.
McNicholl EMA
Dennis McNicholl developed this Moving Average to use as his center line for his "Better Bollinger Bands" indicator and was successful because it responded better to volatility changes over the standard SMA and managed to avoid common whipsaws.
Non lag moving average
The Non Lag Moving average follows price closely and gives very quick signals as well as early signals of price change. As a standalone Moving Average, it should not be used on its own, but as an additional confluence tool for early signals.
Parabolic Weighted Moving Average
The Parabolic Weighted Moving Average is a variation of the Linear Weighted Moving Average. The Linear Weighted Moving Average calculates the average by assigning different weight to each element in its calculation. The Parabolic Weighted Moving Average is a variation that allows weights to be changed to form a parabolic curve. It is done simply by using the Power parameter of this indicator.
Recursive Moving Trendline
Dennis Meyers's Recursive Moving Trendline uses a recursive (repeated application of a rule) polynomial fit, a technique that uses a small number of past values estimations of price and today's price to predict tomorrows price.
Simple Moving Average - SMA
The SMA calculates the average of a range of prices by adding recent prices and then dividing that figure by the number of time periods in the calculation average. It is the most basic Moving Average which is seen as a reliable tool for starting off with Moving Average studies. As reliable as it may be, the basic moving average will work better when it's enhanced into an EMA.
Sine Weighted Moving Average
The Sine Weighted Moving Average assigns the most weight at the middle of the data set. It does this by weighting from the first half of a Sine Wave Cycle and the most weighting is given to the data in the middle of that data set. The Sine WMA closely resembles the TMA (Triangular Moving Average).
Smoothed Moving Average - SMMA
The Smoothed Moving Average is similar to the Simple Moving Average (SMA), but aims to reduce noise rather than reduce lag. SMMA takes all prices into account and uses a long lookback period. Due to this, it's seen a an accurate yet laggy Moving Average.
Smoother
The Smoother filter is a faster-reacting smoothing technique which generates considerably less lag than the SMMA (Smoothed Moving Average). It gives earlier signals but can also create false signals due to its earlier reactions. This filter is sometimes wrongly mistaken for the superior Jurik Smoothing algorithm.
Super Smoother
The Super Smoother filter uses John Ehlers’s “Super Smoother” which consists of a a Two pole Butterworth filter combined with a 2-bar SMA (Simple Moving Average) that suppresses the 22050 Hz Nyquist frequency: A characteristic of a sampler, which converts a continuous function or signal into a discrete sequence.
Three pole Ehlers Butterworth
The 3 pole Ehlers Butterworth (as well as the Two pole Butterworth) are both superior alternatives to the EMA and SMA. They aim at producing less lag whilst maintaining accuracy. The 2 pole filter will give you a better approximation for price, whereas the 3 pole filter has superior smoothing.
Three pole Ehlers smoother
The 3 pole Ehlers smoother works almost as close to price as the above mentioned 3 Pole Ehlers Butterworth. It acts as a strong baseline for signals but removes some noise. Side by side, it hardly differs from the Three Pole Ehlers Butterworth but when examined closely, it has better overshoot reduction compared to the 3 pole Ehlers Butterworth.
Triangular Moving Average - TMA
The TMA is similar to the EMA but uses a different weighting scheme. Exponential and weighted Moving Averages will assign weight to the most recent price data. Simple moving averages will assign the weight equally across all the price data. With a TMA (Triangular Moving Average), it is double smoother (averaged twice) so the majority of the weight is assigned to the middle portion of the data.
The TMA and Sine Weighted Moving Average Filter are almost identical at times.
Triple Exponential Moving Average - TEMA
The TEMA uses multiple EMA calculations as well as subtracting lag to create a tool which can be used for scalping pullbacks. As it follows price closely, it's signals are considered very noisy and should only be used in extremely fast-paced trading conditions.
Two pole Ehlers Butterworth
The 2 pole Ehlers Butterworth (as well as the three pole Butterworth mentioned above) is another filter that cuts out the noise and follows the price closely. The 2 pole is seen as a faster, leading filter over the 3 pole and follows price a bit more closely. Analysts will utilize both a 2 pole and a 3 pole Butterworth on the same chart using the same period, but having both on chart allows its crosses to be traded.
Two pole Ehlers smoother
A smoother version of the Two pole Ehlers Butterworth. This filter is the faster version out of the 3 pole Ehlers Butterworth. It does a decent job at cutting out market noise whilst emphasizing a closer following to price over the 3 pole Ehlers.
Volume Weighted EMA - VEMA
Utilizing tick volume in MT4 (or real volume in MT5), this EMA will use the Volume reading in its decision to plot its moves. The more Volume it detects on a move, the more authority (confirmation) it has. And this EMA uses those Volume readings to plot its movements.
Studies show that tick volume and real volume have a very strong correlation, so using this filter in MT4 or MT5 produces very similar results and readings.
Zero Lag DEMA - Zero Lag Double Exponential Moving Average
John Ehlers's Zero Lag DEMA's aim is to eliminate the inherent lag associated with all trend following indicators which average a price over time. Because this is a Double Exponential Moving Average with Zero Lag, it has a tendency to overshoot and create a lot of false signals for swing trading. It can however be used for quick scalping or as a secondary indicator for confluence.
Zero Lag Moving Average
The Zero Lag Moving Average is described by its creator, John Ehlers, as a Moving Average with absolutely no delay. And it's for this reason that this filter will cause a lot of abrupt signals which will not be ideal for medium to long-term traders. This filter is designed to follow price as close as possible whilst de-lagging data instead of basing it on regular data. The way this is done is by attempting to remove the cumulative effect of the Moving Average.
Zero Lag TEMA - Zero Lag Triple Exponential Moving Average
Just like the Zero Lag DEMA, this filter will give you the fastest signals out of all the Zero Lag Moving Averages. This is useful for scalping but dangerous for medium to long-term traders, especially during market Volatility and news events. Having no lag, this filter also has no smoothing in its signals and can cause some very bizarre behavior when applied to certain indicators.
________________________________________________________________
What are Heiken Ashi "better" candles?
The "better formula" was proposed in an article/memo by BNP-Paribas (In Warrants & Zertifikate, No. 8, August 2004 (a monthly German magazine published by BNP Paribas, Frankfurt), there is an article by Sebastian Schmidt about further development (smoothing) of Heikin-Ashi chart.)
They proposed to use the following:
(Open+Close)/2+(((Close-Open)/( High-Low ))*ABS((Close-Open)/2))
instead of using :
haClose = (O+H+L+C)/4
According to that document the HA representation using their proposed formula is better than the traditional formula.
What are traditional Heiken-Ashi candles?
The Heikin-Ashi technique averages price data to create a Japanese candlestick chart that filters out market noise.
Heikin-Ashi charts, developed by Munehisa Homma in the 1700s, share some characteristics with standard candlestick charts but differ based on the values used to create each candle. Instead of using the open, high, low, and close like standard candlestick charts, the Heikin-Ashi technique uses a modified formula based on two-period averages. This gives the chart a smoother appearance, making it easier to spots trends and reversals, but also obscures gaps and some price data.
Expanded generic source types:
Close = close
Open = open
High = high
Low = low
Median = hl2
Typical = hlc3
Weighted = hlcc4
Average = ohlc4
Average Median Body = (open+close)/2
Trend Biased = (see code, too complex to explain here)
Trend Biased (extreme) = (see code, too complex to explain here)
Included:
-Toggle bar color on/off
-Toggle signal line on/off
[blackcat] L2 Ehlers Fisherized Deviation Scaled OscillatorLevel: 2
Background
John F. Ehlers introuced Fisherized Deviation Scaled Oscillator in Oct, 2018.
Function
In “Probability—Probably A Good Thing To Know,” John Ehlers introduces a procedure for measuring an indicator’s probability distribution to determine if it can be used as part of a reversion-to-the-mean trading strategy. Dr. Ehlers demonstrates this method with several of his existing indicators and presents a new indicator that he calls a deviation-scaled oscillator with Fisher transform. It charts the probability density of an oscillator to evaluate its applicability to swing trading.
Key Signal
FisherFilt --> Ehlers Fisherized Deviation Scaled Oscillator fast line
Trigger --> Ehlers Fisherized Deviation Scaled Oscillator slow line
Pros and Cons
100% John F. Ehlers definition translation, even variable names are the same. This help readers who would like to use pine to read his book.
Remarks
The 91th script for Blackcat1402 John F. Ehlers Week publication.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Scout Regiment - MACD# Scout Regiment - MACD Indicator
## English Documentation
### Overview
Scout Regiment - MACD is an advanced implementation of the Moving Average Convergence Divergence indicator with enhanced features including dual divergence detection (histogram and MACD line), customizable moving average types, multi-timeframe analysis, and sophisticated visual elements. This indicator provides traders with comprehensive momentum analysis and high-probability reversal signals.
### What is MACD?
MACD (Moving Average Convergence Divergence) is a trend-following momentum indicator that shows the relationship between two moving averages:
- **MACD Line**: Difference between fast and slow EMAs
- **Signal Line**: Moving average of the MACD line
- **Histogram**: Difference between MACD line and signal line
- **Purpose**: Identifies trend direction, momentum strength, and potential reversals
### Key Features
#### 1. **Enhanced MACD Display**
**Three Core Components:**
**MACD Line** (Default: Blue/Orange, 2px)
- Fast EMA (13) minus Slow EMA (34)
- Shows momentum direction
- Color changes based on position relative to signal line:
- Blue: Above signal line (bullish)
- Orange: Below signal line (bearish)
- Can be toggled on/off
**Signal Line** (Default: White/Blue with transparency, 2px)
- EMA (9) of the MACD line
- Serves as trigger line for crossover signals
- Color varies based on settings
- Essential for identifying entry/exit points
**Histogram** (Default: 4-color gradient, 4px columns)
- Difference between MACD and signal line
- Visual representation of momentum strength
- Advanced 4-color scheme:
- **Dark Green (#26A69A)**: Positive and increasing (strong bullish)
- **Light Green (#B2DFDB)**: Positive but decreasing (weakening bullish)
- **Dark Red (#FF5252)**: Negative and decreasing (strong bearish)
- **Light Red (#FFCDD2)**: Negative but increasing (weakening bearish)
- Histogram tells the "story" of momentum changes
#### 2. **Customizable Moving Average Types**
**Oscillator MA Type** (MACD Line calculation):
- **EMA** (Exponential) - Default, more responsive
- **SMA** (Simple) - Smoother, less responsive
**Signal Line MA Type**:
- **EMA** (Exponential) - Default, faster signals
- **SMA** (Simple) - Slower, fewer false signals
**Flexibility**: Mix and match for different trading styles
- EMA/EMA: Most responsive (day trading)
- SMA/SMA: Smoothest (swing trading)
- EMA/SMA or SMA/EMA: Balanced approaches
#### 3. **Multi-Timeframe Capability**
**Current Chart Period** (Default: Enabled)
- Uses current timeframe automatically
- Simplest option for most traders
**Custom Timeframe Selection**
- Calculate MACD on any timeframe
- Display higher timeframe MACD on lower timeframe charts
- Example: View 1H MACD on 15min chart
- **Use Case**: Align lower timeframe trades with higher timeframe momentum
#### 4. **Visual Enhancement Features**
**Golden Cross / Death Cross Markers**
- Circles mark crossover points
- Color matches MACD line color
- Clearly identifies entry/exit signals
- Can be toggled on/off
**Zero Line** (White, 2px solid)
- Reference for positive/negative momentum
- Critical level for trend identification
- MACD above zero = Bullish bias
- MACD below zero = Bearish bias
**Color Transitions**
- MACD line changes color at signal line crosses
- Histogram shows momentum acceleration/deceleration
- Provides early warning of trend changes
#### 5. **Dual Divergence Detection System**
This indicator features TWO separate divergence detection systems:
**A. Histogram Divergence Detection**
- **Purpose**: Earlier divergence signals (most sensitive)
- **Detects**: Regular bullish and bearish divergences
- **Label**: "H涨" (Histogram Up), "H跌" (Histogram Down)
- **Special Feature**: Same-sign requirement option
- Top divergence: Both histogram points must be positive
- Bottom divergence: Both histogram points must be negative
- Filters out less reliable divergences
**B. MACD Line Divergence Detection**
- **Purpose**: Stronger, more reliable divergences
- **Detects**: Regular bullish and bearish divergences
- **Label**: "M涨" (MACD Up), "M跌" (MACD Down)
- **Use**: Confirmation of histogram divergences or standalone
**Divergence Types Explained:**
**Regular Bullish Divergence (Yellow)**
- **Price**: Lower lows
- **Indicator**: Higher lows (histogram OR MACD line)
- **Signal**: Potential upward reversal
- **Best**: Near support levels, oversold conditions
- **Entry**: After price breaks above recent resistance
**Regular Bearish Divergence (Blue)**
- **Price**: Higher highs
- **Indicator**: Lower highs (histogram OR MACD line)
- **Signal**: Potential downward reversal
- **Best**: Near resistance levels, overbought conditions
- **Entry**: After price breaks below recent support
#### 6. **Advanced Divergence Parameters**
**Histogram Divergence Settings:**
- **Price Reference**: Wicks (default) or Bodies
- **Right Lookback**: Bars to right of pivot (default: 2)
- **Left Lookback**: Bars to left of pivot (default: 5)
- **Max Range**: Maximum bars between divergences (default: 60)
- **Min Range**: Minimum bars between divergences (default: 5)
- **Same Sign Requirement**: Ensures both histogram points have same sign
- **Show Regular Divergence**: Toggle display
- **Show Labels**: Toggle divergence labels
**MACD Line Divergence Settings:**
- **Price Reference**: Wicks (default) or Bodies
- **Right Lookback**: Bars to right of pivot (default: 1)
- **Left Lookback**: Bars to left of pivot (default: 5)
- **Max Range**: Maximum bars between divergences (default: 60)
- **Min Range**: Minimum bars between divergences (default: 5)
- **Show Regular Divergence**: Toggle display
- **Show Labels**: Toggle divergence labels
**Independent Control**: Adjust histogram and MACD line divergences separately
### Configuration Settings
#### MACD Basic Settings
- **Fast EMA Period**: Fast moving average length (default: 13)
- **Slow EMA Period**: Slow moving average length (default: 34)
- **Signal Line Period**: Signal line length (default: 9)
- **Use Current Chart Period**: Auto-adjust to current timeframe
- **Select Period**: Choose custom timeframe
- **Show MACD & Signal Lines**: Toggle lines display
- **Show Cross Markers**: Toggle golden/death cross dots
- **Show Histogram**: Toggle histogram display
- **Show Crossover Color Change**: Enable MACD line color change
- **Show Histogram Colors**: Enable 4-color histogram scheme
- **Oscillator MA Type**: Choose SMA or EMA for MACD
- **Signal Line MA Type**: Choose SMA or EMA for signal
#### Histogram Divergence Settings
- **Show Histogram Divergence**: Enable histogram divergence detection
- **Price Reference**: Wicks or Bodies for price comparison
- **Right/Left Lookback**: Pivot detection parameters
- **Max/Min Range**: Distance constraints between pivots
- **Show Regular Divergence**: Display histogram divergence lines
- **Show Labels**: Display histogram divergence labels
- **Require Same Sign**: Enforce histogram sign consistency
#### MACD Line Divergence Settings
- **Show MACD Line Divergence**: Enable MACD line divergence detection
- **Price Reference**: Wicks or Bodies for price comparison
- **Right/Left Lookback**: Pivot detection parameters
- **Max/Min Range**: Distance constraints between pivots
- **Show Regular Divergence**: Display MACD line divergence lines
- **Show Labels**: Display MACD line divergence labels
### How to Use
#### For Basic Trend Following
1. **Enable Core Components**
- MACD line, signal line, and histogram
- Enable cross markers
2. **Identify Trend**
- MACD above zero = Uptrend
- MACD below zero = Downtrend
3. **Watch for Crossovers**
- Golden cross (MACD crosses above signal) = Buy signal
- Death cross (MACD crosses below signal) = Sell signal
4. **Confirm with Histogram**
- Increasing histogram = Strengthening trend
- Decreasing histogram = Weakening trend
#### For Divergence Trading
1. **Enable Both Divergence Systems**
- Histogram divergence (early signals)
- MACD line divergence (confirmation)
2. **Wait for Divergence Signals**
- "H涨" or "H跌" = Early warning
- "M涨" or "M跌" = Confirmation
3. **Best Divergences**
- Both histogram AND MACD line showing divergence
- Divergence at key support/resistance levels
- Multiple divergences on same trend
4. **Entry Timing**
- Wait for price structure break
- Enter on pullback after confirmation
- Use MACD crossover as trigger
#### For Multi-Timeframe Analysis
1. **Set Higher Timeframe**
- Example: 4H MACD on 1H chart
- Uncheck "Use Current Chart Period"
- Select desired timeframe
2. **Identify Higher TF Trend**
- MACD position relative to zero
- MACD vs signal line relationship
3. **Trade with HTF Direction**
- Only take long signals if HTF MACD bullish
- Only take short signals if HTF MACD bearish
4. **Use Current TF for Entries**
- Higher TF for bias
- Current TF for precise timing
#### For Histogram Analysis
1. **Enable 4-Color Histogram**
- Watch color transitions
- Dark colors = Strong momentum
- Light colors = Weakening momentum
2. **Momentum Stages**
- Dark green → Light green = Bullish losing steam
- Light red → Dark red = Bearish gaining strength
3. **Trade Transitions**
- Light green to light red = Momentum shift (potential reversal)
- Entry on confirmation crossover
### Trading Strategies
#### Strategy 1: Classic MACD Crossover
**Setup:**
- Standard settings (13/34/9)
- Enable MACD, signal line, and cross markers
- Clear trend on higher timeframe
**Entry:**
- **Long**: Golden cross (circle marker) above zero line
- **Short**: Death cross (circle marker) below zero line
**Confirmation:**
- Histogram color supporting direction
- Volume increase helps
**Stop Loss:**
- Below recent swing low (long)
- Above recent swing high (short)
**Exit:**
- Opposite crossover
- MACD crosses zero line against position
**Best For:** Trend following, clear trending markets
#### Strategy 2: Zero Line Bounce
**Setup:**
- Enable all components
- Established trend (MACD staying one side of zero)
- Wait for pullback to zero line
**Entry:**
- **Long**: MACD touches zero from above, bounces up with golden cross
- **Short**: MACD touches zero from below, bounces down with death cross
**Confirmation:**
- Histogram color change
- Price at support/resistance
**Stop Loss:**
- Just beyond zero line (opposite side)
**Exit:**
- Target previous extreme
- Or opposite crossover
**Best For:** Trend continuation, strong markets
#### Strategy 3: Dual Divergence Confirmation
**Setup:**
- Enable both histogram and MACD line divergences
- Price at extreme (high/low)
- Wait for divergence signals
**Entry:**
- **Long**: Both "H涨" AND "M涨" labels appear
- **Short**: Both "H跌" AND "M跌" labels appear
**Confirmation:**
- Price breaks structure
- Volume increase
- Golden/death cross confirms
**Stop Loss:**
- Beyond divergence pivot point
**Exit:**
- MACD crosses zero line
- Or opposite divergence appears
**Best For:** Reversal trading, swing trading
#### Strategy 4: Histogram Color Transition
**Setup:**
- Enable 4-color histogram
- Focus on color changes
- Price in trend
**Entry:**
- **Long**: Light red → Light green transition + golden cross
- **Short**: Light green → Light red transition + death cross
**Rationale:**
- Light colors show momentum exhaustion
- Color flip = momentum shift
- Early entry before full trend reversal
**Stop Loss:**
- Recent swing point
**Exit:**
- Histogram color turns light against position
- Or at predetermined target
**Best For:** Scalping, day trading, early entries
#### Strategy 5: Multi-Timeframe Momentum
**Setup:**
- Display higher timeframe MACD (e.g., 4H on 1H chart)
- Current chart shows current momentum
- Higher TF shows overall bias
**Entry:**
- **Long**: HTF MACD above zero + current TF golden cross
- **Short**: HTF MACD below zero + current TF death cross
**Confirmation:**
- HTF histogram supporting direction
- Both timeframes aligned
**Stop Loss:**
- Based on current timeframe structure
**Exit:**
- Current TF opposite crossover
- Or HTF MACD momentum weakens
**Best For:** Swing trading, high-probability setups
#### Strategy 6: Histogram-Only Divergence Scout
**Setup:**
- Enable only histogram divergence
- Use "same sign requirement"
- Focus on early signals
**Entry:**
- **Long**: "H涨" label + price at support
- **Short**: "H跌" label + price at resistance
**Confirmation:**
- Wait for MACD/signal crossover
- Or price structure break
**Advantage:**
- Earliest divergence signals
- Get in before crowd
**Risk:**
- More false signals than MACD line divergence
- Requires strict confirmation
**Stop Loss:**
- Tight stop beyond entry bar
**Exit:**
- Quick targets (30-50% of expected move)
- Or trail stop
**Best For:** Active traders, scalpers seeking early entries
### Best Practices
#### MACD Period Selection
**Standard (13/34/9)** - Default
- Balanced for most markets
- Good for day trading and swing trading
- Widely used, works with general market psychology
**Faster (8/21/5 or 12/26/9)**
- More responsive
- More signals, more noise
- Best for: Scalping, volatile markets
- Risk: More false signals
**Slower (21/55/13)**
- Smoother signals
- Fewer but stronger signals
- Best for: Swing trading, position trading
- Benefit: Higher reliability
#### Histogram vs MACD Line Divergences
**Histogram Divergence:**
- ✅ Earlier signals
- ✅ Catch moves before others
- ❌ More false signals
- ❌ Requires confirmation
- **Best for**: Active traders, scalpers
**MACD Line Divergence:**
- ✅ More reliable
- ✅ Stronger divergences
- ❌ Later signals
- ❌ May miss early moves
- **Best for**: Swing traders, conservative traders
**Both Together:**
- ✅ Maximum confidence
- ✅ Histogram for alert, MACD for confirmation
- ✅ Highest probability setups
- **Best for**: All traders seeking quality over quantity
#### Same Sign Requirement Feature
**Enabled (Recommended):**
- Filters low-quality divergences
- Top divergence: Both histogram points positive
- Bottom divergence: Both histogram points negative
- Results in fewer but more reliable signals
**Disabled:**
- More divergence signals
- Includes zero-line crossing divergences
- Higher false signal rate
- Only for experienced traders
#### Price Reference: Wicks vs Bodies
**Wicks (Default):**
- Uses high/low prices
- Catches all extremes
- More divergences detected
- Best for: Most trading styles
**Bodies:**
- Uses open/close prices
- Filters out spike movements
- Fewer but cleaner divergences
- Best for: Noisy markets, crypto
#### Visual Settings Recommendations
**For Beginners:**
- Enable: MACD line, signal line, histogram
- Enable: Cross markers
- Enable: Histogram colors
- Disable: Both divergence systems initially
- Focus: Learn basic crossovers first
**For Intermediate:**
- All basic components
- Add: Histogram divergence only
- Use: Same sign requirement
- Focus: Early reversal signals
**For Advanced:**
- All components
- Both divergence systems
- Custom parameters per market
- Multi-timeframe analysis
- Focus: High-probability confluence setups
### Indicator Combinations
**With Moving Averages (EMAs):**
- EMAs (21/55/144) show trend
- MACD shows momentum
- Enter when both align
- Exit when MACD turns first
**With RSI:**
- RSI for overbought/oversold
- MACD for momentum confirmation
- Divergence on both = Extremely strong signal
- RSI + MACD divergence = High probability trade
**With Volume:**
- Volume confirms MACD signals
- Crossover + volume spike = Valid breakout
- Divergence + volume divergence = Strong reversal
**With Support/Resistance:**
- S/R levels for entry/exit targets
- MACD divergence at levels = Highest probability
- MACD crossover at level = Strong confirmation
**With Bias Indicator:**
- Bias shows price deviation from EMA
- MACD shows momentum
- Both diverging = Powerful reversal signal
- Bias extreme + MACD divergence = High conviction trade
**With OBV:**
- OBV shows volume trend
- MACD shows price momentum
- OBV + MACD divergence = Volume not supporting price
- Strong reversal indication
**With KSI (RSI/CCI):**
- KSI for oscillator extremes
- MACD for momentum direction
- KSI extreme + MACD divergence = Reversal likely
- All aligned = Maximum confidence
### Common MACD Patterns
1. **Bullish Cross Above Zero**: Strong uptrend continuation signal
2. **Bearish Cross Below Zero**: Strong downtrend continuation signal
3. **Zero Line Rejection**: Price respects zero as support/resistance
4. **Histogram Peak**: Momentum climax, watch for reversal
5. **Double Divergence**: Two divergences without reversal = Very strong signal when it finally reverses
6. **Histogram Convergence**: Histogram narrowing = Trend losing steam
7. **Signal Line Hug**: MACD stays close to signal = Consolidation, expect breakout
### Performance Tips
- Start with default settings (13/34/9 EMA/EMA)
- Test one divergence system at a time
- Use same sign requirement initially
- Enable cross markers for clear signals
- Adjust lookback parameters per market volatility
- Higher timeframe MACD more reliable than lower
- Combine histogram early signal with MACD line confirmation
- Don't trade every divergence - wait for best setups
### Alert Conditions
While not explicitly coded, you can set custom alerts on:
- MACD crossing above/below signal line
- MACD crossing above/below zero line
- Histogram crossing zero
- When divergence labels appear (using visual alerts)
---
## 中文说明文档
### 概述
Scout Regiment - MACD 是移动平均线收敛发散指标的高级实现版本,具有增强功能,包括双重背离检测(直方图和MACD线)、可自定义的移动平均类型、多时间框架分析和复杂的视觉元素。该指标为交易者提供全面的动量分析和高概率反转信号。
### 什么是MACD?
MACD(移动平均线收敛发散)是一个趋势跟随动量指标,显示两条移动平均线之间的关系:
- **MACD线**:快速和慢速EMA之间的差值
- **信号线**:MACD线的移动平均
- **直方图**:MACD线和信号线之间的差值
- **用途**:识别趋势方向、动量强度和潜在反转
### 核心功能
#### 1. **增强的MACD显示**
**三个核心组件:**
**MACD线**(默认:蓝色/橙色,2像素)
- 快速EMA(13)减去慢速EMA(34)
- 显示动量方向
- 根据相对于信号线的位置改变颜色:
- 蓝色:信号线上方(看涨)
- 橙色:信号线下方(看跌)
- 可开关显示
**信号线**(默认:白色/蓝色带透明度,2像素)
- MACD线的EMA(9)
- 作为交叉信号的触发线
- 颜色根据设置变化
- 识别进出场点的关键
**直方图**(默认:4色渐变,4像素柱)
- MACD和信号线之间的差值
- 动量强度的视觉表示
- 高级4色方案:
- **深绿色(#26A69A)**:正值且增加(强劲看涨)
- **浅绿色(#B2DFDB)**:正值但减少(看涨减弱)
- **深红色(#FF5252)**:负值且减少(强劲看跌)
- **浅红色(#FFCDD2)**:负值但增加(看跌减弱)
- 直方图讲述动量变化的"故事"
#### 2. **可自定义的移动平均类型**
**振荡器MA类型**(MACD线计算):
- **EMA**(指数)- 默认,反应更快
- **SMA**(简单)- 更平滑,反应较慢
**信号线MA类型**:
- **EMA**(指数)- 默认,更快信号
- **SMA**(简单)- 更慢,假信号更少
**灵活性**:混合搭配以适应不同交易风格
- EMA/EMA:最灵敏(日内交易)
- SMA/SMA:最平滑(波段交易)
- EMA/SMA或SMA/EMA:平衡方法
#### 3. **多时间框架功能**
**当前图表周期**(默认:启用)
- 自动使用当前时间框架
- 大多数交易者的最简单选项
**自定义时间框架选择**
- 在任何时间框架上计算MACD
- 在低时间框架图表上显示高时间框架MACD
- 示例:在15分钟图上查看1小时MACD
- **使用场景**:使低时间框架交易与高时间框架动量保持一致
#### 4. **视觉增强功能**
**金叉/死叉标记**
- 圆点标记交叉点
- 颜色与MACD线颜色匹配
- 清晰识别进出场信号
- 可开关
**零线**(白色,2像素实线)
- 正负动量的参考
- 趋势识别的关键水平
- MACD在零线上方 = 看涨偏向
- MACD在零线下方 = 看跌偏向
**颜色转换**
- MACD线在信号线交叉处改变颜色
- 直方图显示动量加速/减速
- 提供趋势变化的早期警告
#### 5. **双重背离检测系统**
该指标具有两个独立的背离检测系统:
**A. 直方图背离检测**
- **用途**:更早的背离信号(最敏感)
- **检测**:常规看涨和看跌背离
- **标签**:"H涨"(直方图上涨)、"H跌"(直方图下跌)
- **特殊功能**:同符号要求选项
- 顶背离:两个直方图点都必须为正
- 底背离:两个直方图点都必须为负
- 过滤不太可靠的背离
**B. MACD线背离检测**
- **用途**:更强、更可靠的背离
- **检测**:常规看涨和看跌背离
- **标签**:"M涨"(MACD上涨)、"M跌"(MACD下跌)
- **用途**:确认直方图背离或独立使用
**背离类型说明:**
**常规看涨背离(黄色)**
- **价格**:更低的低点
- **指标**:更高的低点(直方图或MACD线)
- **信号**:潜在向上反转
- **最佳**:在支撑水平附近、超卖状况
- **入场**:价格突破近期阻力后
**常规看跌背离(蓝色)**
- **价格**:更高的高点
- **指标**:更低的高点(直方图或MACD线)
- **信号**:潜在向下反转
- **最佳**:在阻力水平附近、超买状况
- **入场**:价格跌破近期支撑后
#### 6. **高级背离参数**
**直方图背离设置:**
- **价格参考**:影线(默认)或实体
- **右侧回溯**:枢轴点右侧K线数(默认:2)
- **左侧回溯**:枢轴点左侧K线数(默认:5)
- **最大范围**:背离之间最大K线数(默认:60)
- **最小范围**:背离之间最小K线数(默认:5)
- **同符号要求**:确保两个直方图点符号相同
- **显示常规背离**:切换显示
- **显示标签**:切换背离标签
**MACD线背离设置:**
- **价格参考**:影线(默认)或实体
- **右侧回溯**:枢轴点右侧K线数(默认:1)
- **左侧回溯**:枢轴点左侧K线数(默认:5)
- **最大范围**:背离之间最大K线数(默认:60)
- **最小范围**:背离之间最小K线数(默认:5)
- **显示常规背离**:切换显示
- **显示标签**:切换背离标签
**独立控制**:分别调整直方图和MACD线背离
### 配置设置
#### MACD基础设置
- **快速EMA周期**:快速移动平均长度(默认:13)
- **慢速EMA周期**:慢速移动平均长度(默认:34)
- **信号线周期**:信号线长度(默认:9)
- **使用当前图表周期**:自动调整到当前时间框架
- **选择周期**:选择自定义时间框架
- **显示MACD线和信号线**:切换线条显示
- **显示金叉死叉圆点标记**:切换金叉/死叉圆点
- **显示直方图**:切换直方图显示
- **显示穿越变化MACD线**:启用MACD线颜色变化
- **显示直方图颜色**:启用4色直方图方案
- **振荡器MA类型**:为MACD选择SMA或EMA
- **信号线MA类型**:为信号线选择SMA或EMA
#### 直方图背离设置
- **显示直方图背离信号**:启用直方图背离检测
- **价格参考**:影线或实体用于价格比较
- **右侧/左侧回溯**:枢轴检测参数
- **最大/最小范围**:枢轴之间的距离约束
- **显示直方图常规背离**:显示直方图背离线
- **显示直方图常规背离标签**:显示直方图背离标签
- **要求背离点柱状图同符号**:强制直方图符号一致性
#### MACD线背离设置
- **显示MACD线背离信号**:启用MACD线背离检测
- **价格参考**:影线或实体用于价格比较
- **右侧/左侧回溯**:枢轴检测参数
- **最大/最小范围**:枢轴之间的距离约束
- **显示线常规背离**:显示MACD线背离线
- **显示线常规背离标签**:显示MACD线背离标签
### 使用方法
#### 基础趋势跟随
1. **启用核心组件**
- MACD线、信号线和直方图
- 启用交叉标记
2. **识别趋势**
- MACD在零线上方 = 上升趋势
- MACD在零线下方 = 下降趋势
3. **观察交叉**
- 金叉(MACD向上穿越信号线)= 买入信号
- 死叉(MACD向下穿越信号线)= 卖出信号
4. **用直方图确认**
- 直方图增加 = 趋势加强
- 直方图减少 = 趋势减弱
#### 背离交易
1. **启用两个背离系统**
- 直方图背离(早期信号)
- MACD线背离(确认)
2. **等待背离信号**
- "H涨"或"H跌" = 早期警告
- "M涨"或"M跌" = 确认
3. **最佳背离**
- 直方图和MACD线都显示背离
- 在关键支撑/阻力水平的背离
- 同一趋势上多个背离
4. **入场时机**
- 等待价格结构突破
- 确认后回调时进入
- 使用MACD交叉作为触发
#### 多时间框架分析
1. **设置更高时间框架**
- 示例:在1小时图上显示4小时MACD
- 取消勾选"使用当前图表周期"
- 选择所需时间框架
2. **识别更高TF趋势**
- MACD相对于零线的位置
- MACD与信号线的关系
3. **顺HTF方向交易**
- 仅在HTF MACD看涨时接受多头信号
- 仅在HTF MACD看跌时接受空头信号
4. **使用当前TF入场**
- 更高TF确定偏向
- 当前TF精确定时
#### 直方图分析
1. **启用4色直方图**
- 观察颜色转换
- 深色 = 强动量
- 浅色 = 动量减弱
2. **动量阶段**
- 深绿色→浅绿色 = 看涨失去动力
- 浅红色→深红色 = 看跌获得力量
3. **交易转换**
- 浅绿色到浅红色 = 动量转变(潜在反转)
- 确认交叉时入场
### 交易策略
#### 策略1:经典MACD交叉
**设置:**
- 标准设置(13/34/9)
- 启用MACD、信号线和交叉标记
- 更高时间框架明确趋势
**入场:**
- **多头**:零线上方金叉(圆点标记)
- **空头**:零线下方死叉(圆点标记)
**确认:**
- 直方图颜色支持方向
- 成交量增加有帮助
**止损:**
- 近期波动低点之下(多头)
- 近期波动高点之上(空头)
**离场:**
- 相反交叉
- MACD反向穿越零线
**适合:**趋势跟随、明确趋势市场
#### 策略2:零线反弹
**设置:**
- 启用所有组件
- 已建立趋势(MACD保持在零线一侧)
- 等待回调至零线
**入场:**
- **多头**:MACD从上方触及零线,向上反弹并金叉
- **空头**:MACD从下方触及零线,向下反弹并死叉
**确认:**
- 直方图颜色变化
- 价格在支撑/阻力位
**止损:**
- 零线对面一侧
**离场:**
- 目标前一极值
- 或相反交叉
**适合:**趋势延续、强势市场
#### 策略3:双重背离确认
**设置:**
- 启用直方图和MACD线背离
- 价格在极值(高点/低点)
- 等待背离信号
**入场:**
- **多头**:"H涨"和"M涨"标签都出现
- **空头**:"H跌"和"M跌"标签都出现
**确认:**
- 价格突破结构
- 成交量增加
- 金叉/死叉确认
**止损:**
- 背离枢轴点之外
**离场:**
- MACD穿越零线
- 或出现相反背离
**适合:**反转交易、波段交易
#### 策略4:直方图颜色转换
**设置:**
- 启用4色直方图
- 关注颜色变化
- 价格处于趋势
**入场:**
- **多头**:浅红色→浅绿色转换 + 金叉
- **空头**:浅绿色→浅红色转换 + 死叉
**原理:**
- 浅色显示动量衰竭
- 颜色翻转 = 动量转变
- 完全趋势反转前的早期入场
**止损:**
- 近期波动点
**离场:**
- 直方图颜色变为反向浅色
- 或预定目标
**适合:**剥头皮、日内交易、早期入场
#### 策略5:多时间框架动量
**设置:**
- 显示更高时间框架MACD(例如,在1小时图上显示4小时)
- 当前图表显示当前动量
- 更高TF显示整体偏向
**入场:**
- **多头**:HTF MACD在零线上方 + 当前TF金叉
- **空头**:HTF MACD在零线下方 + 当前TF死叉
**确认:**
- HTF直方图支持方向
- 两个时间框架对齐
**止损:**
- 基于当前时间框架结构
**离场:**
- 当前TF相反交叉
- 或HTF MACD动量减弱
**适合:**波段交易、高概率设置
#### 策略6:仅直方图背离侦察
**设置:**
- 仅启用直方图背离
- 使用"同符号要求"
- 关注早期信号
**入场:**
- **多头**:"H涨"标签 + 价格在支撑位
- **空头**:"H跌"标签 + 价格在阻力位
**确认:**
- 等待MACD/信号线交叉
- 或价格结构突破
**优势:**
- 最早的背离信号
- 在大众之前进入
**风险:**
- 比MACD线背离假信号更多
- 需要严格确认
**止损:**
- 入场K线之外紧密止损
**离场:**
- 快速目标(预期波动的30-50%)
- 或移动止损
**适合:**活跃交易者、寻求早期入场的剥头皮交易者
### 最佳实践
#### MACD周期选择
**标准(13/34/9)** - 默认
- 大多数市场的平衡
- 适合日内交易和波段交易
- 广泛使用,符合一般市场心理
**更快(8/21/5或12/26/9)**
- 更灵敏
- 更多信号,更多噪音
- 最适合:剥头皮、波动市场
- 风险:更多假信号
**更慢(21/55/13)**
- 更平滑的信号
- 信号较少但更强
- 最适合:波段交易、仓位交易
- 优势:更高可靠性
#### 直方图vs MACD线背离
**直方图背离:**
- ✅ 更早信号
- ✅ 在其他人之前捕捉波动
- ❌ 更多假信号
- ❌ 需要确认
- **最适合**:活跃交易者、剥头皮交易者
**MACD线背离:**
- ✅ 更可靠
- ✅ 更强的背离
- ❌ 信号较晚
- ❌ 可能错过早期波动
- **最适合**:波段交易者、保守交易者
**两者结合:**
- ✅ 最大信心
- ✅ 直方图警报,MACD确认
- ✅ 最高概率设置
- **最适合**:所有寻求质量而非数量的交易者
#### 同符号要求功能
**启用(推荐):**
- 过滤低质量背离
- 顶背离:两个直方图点都为正
- 底背离:两个直方图点都为负
- 产生更少但更可靠的信号
**禁用:**
- 更多背离信号
- 包括零线穿越背离
- 假信号率更高
- 仅适合有经验的交易者
#### 价格参考:影线vs实体
**影线(默认):**
- 使用最高/最低价
- 捕捉所有极值
- 检测到更多背离
- 最适合:大多数交易风格
**实体:**
- 使用开盘/收盘价
- 过滤突刺波动
- 背离更少但更干净
- 最适合:噪音市场、加密货币
#### 视觉设置建议
**新手:**
- 启用:MACD线、信号线、直方图
- 启用:交叉标记
- 启用:直方图颜色
- 禁用:初始禁用两个背离系统
- 重点:先学习基本交叉
**中级:**
- 所有基本组件
- 添加:仅直方图背离
- 使用:同符号要求
- 重点:早期反转信号
**高级:**
- 所有组件
- 两个背离系统
- 每个市场自定义参数
- 多时间框架分析
- 重点:高概率汇合设置
### 指标组合
**与移动平均线(EMA)配合:**
- EMA(21/55/144)显示趋势
- MACD显示动量
- 两者一致时进入
- MACD先转向时退出
**与RSI配合:**
- RSI用于超买超卖
- MACD用于动量确认
- 两者都背离 = 极强信号
- RSI + MACD背离 = 高概率交易
**与成交量配合:**
- 成交量确认MACD信号
- 交叉 + 成交量激增 = 有效突破
- 背离 + 成交量背离 = 强反转
**与支撑/阻力配合:**
- 支撑阻力水平用于进出目标
- 水平处的MACD背离 = 最高概率
- 水平处的MACD交叉 = 强确认
**与Bias指标配合:**
- Bias显示价格相对EMA的偏离
- MACD显示动量
- 两者都背离 = 强大反转信号
- Bias极值 + MACD背离 = 高信念交易
**与OBV配合:**
- OBV显示成交量趋势
- MACD显示价格动量
- OBV + MACD背离 = 成交量不支持价格
- 强反转迹象
**与KSI(RSI/CCI)配合:**
- KSI用于振荡器极值
- MACD用于动量方向
- KSI极值 + MACD背离 = 可能反转
- 全部对齐 = 最大信心
### 常见MACD形态
1. **零线上方看涨交叉**:强上升趋势延续信号
2. **零线下方看跌交叉**:强下降趋势延续信号
3. **零线拒绝**:价格将零线作为支撑/阻力
4. **直方图峰值**:动量高潮,注意反转
5. **双重背离**:两次背离未反转 = 最终反转时非常强
6. **直方图收敛**:直方图变窄 = 趋势失去动力
7. **信号线紧贴**:MACD紧贴信号线 = 盘整,预期突破
### 性能提示
- 从默认设置开始(13/34/9 EMA/EMA)
- 一次测试一个背离系统
- 初始使用同符号要求
- 启用交叉标记以获得清晰信号
- 根据市场波动性调整回溯参数
- 更高时间框架MACD比更低的更可靠
- 结合直方图早期信号与MACD线确认
- 不要交易每个背离 - 等待最佳设置
### 警报条件
虽然没有明确编码,但您可以设置自定义警报:
- MACD向上/向下穿越信号线
- MACD向上/向下穿越零线
- 直方图穿越零线
- 背离标签出现时(使用视觉警报)
---
## Technical Support
For questions or issues, please refer to the TradingView community or contact the indicator creator.
## 技术支持
如有问题,请参考TradingView社区或联系指标创建者。
Scout Regiment - KSI# Scout Regiment - KSI Indicator
## English Documentation
### Overview
Scout Regiment - KSI (Key Stochastic Indicators) is a comprehensive momentum oscillator that combines three powerful technical indicators - RSI, CCI, and Williams %R - into a single, unified display. This multi-indicator approach provides traders with diverse perspectives on market momentum, overbought/oversold conditions, and potential reversal points through advanced divergence detection.
### What is KSI?
KSI stands for "Key Stochastic Indicators" - a composite momentum indicator that:
- Displays multiple oscillators normalized to a 0-100 scale
- Uses standardized bands (20/50/80) for consistent interpretation
- Combines RSI for trend, CCI for cycle, and Williams %R for reversal detection
- Provides enhanced divergence detection specifically for RSI
### Key Features
#### 1. **Triple Oscillator System**
**① RSI (Relative Strength Index)** - Primary Indicator
- **Purpose**: Measures momentum and identifies overbought/oversold conditions
- **Default Length**: 22 periods
- **Display**: Blue line (2px)
- **Key Levels**:
- Above 50: Bullish momentum
- Below 50: Bearish momentum
- Above 80: Overbought
- Below 20: Oversold
- **Special Features**:
- Background color indication (green/red)
- Crossover labels at 50 level
- Full divergence detection (4 types)
**② CCI (Commodity Channel Index)** - Dual Period
- **Purpose**: Identifies cyclical trends and extreme conditions
- **Dual Display**:
- CCI(33): Short-term cycle - Green line (1px)
- CCI(77): Medium-term cycle - Orange line (1px)
- **Default Source**: HLC3 (typical price)
- **Normalized Scale**: Mapped from ±100 to 0-100 for consistency
- **Interpretation**:
- Above 80: Strong upward momentum
- Below 20: Strong downward momentum
- 50 level: Neutral
- Divergence between periods: Trend change warning
**③ Williams %R** - Optional
- **Purpose**: Identifies overbought/oversold extremes
- **Default Length**: 28 periods
- **Display**: Magenta line (2px)
- **Scale**: Inverted and normalized to 0-100
- **Best For**: Short-term reversal signals
- **Default**: Disabled (enable when needed for extra confirmation)
#### 2. **Standardized Band System**
**Three-Level Structure:**
- **Upper Band (80)**: Overbought zone
- Strong momentum area
- Watch for reversal signals
- Divergences here are most reliable
- **Middle Line (50)**: Equilibrium
- Separates bullish/bearish zones
- Crossovers indicate momentum shifts
- Key decision level
- **Lower Band (20)**: Oversold zone
- Weak momentum area
- Look for bounce signals
- Divergences here signal potential reversals
**Band Fill**: Dark background between 20-80 for visual clarity
#### 3. **RSI Visual Enhancements**
**Background Color Indication**
- Green background: RSI above 50 (bullish bias)
- Red background: RSI below 50 (bearish bias)
- Optional display for cleaner charts
- Helps identify overall momentum direction
**Crossover Labels**
- "突破" (Breakout): RSI crosses above 50
- "跌破" (Breakdown): RSI crosses below 50
- Marks momentum shift points
- Can be toggled on/off
#### 4. **Advanced RSI Divergence Detection**
The indicator includes comprehensive divergence detection for RSI only (most reliable oscillator):
**Regular Bullish Divergence (Yellow)**
- **Price**: Lower lows
- **RSI**: Higher lows
- **Signal**: Potential upward reversal
- **Label**: "涨" (Up)
- **Most Common**: Near oversold levels (below 30)
**Regular Bearish Divergence (Blue)**
- **Price**: Higher highs
- **RSI**: Lower highs
- **Signal**: Potential downward reversal
- **Label**: "跌" (Down)
- **Most Common**: Near overbought levels (above 70)
**Hidden Bullish Divergence (Light Yellow)**
- **Price**: Higher lows
- **RSI**: Lower lows
- **Signal**: Uptrend continuation
- **Label**: "隐涨" (Hidden Up)
- **Use**: Add to existing longs
**Hidden Bearish Divergence (Light Blue)**
- **Price**: Lower highs
- **RSI**: Higher highs
- **Signal**: Downtrend continuation
- **Label**: "隐跌" (Hidden Down)
- **Use**: Add to existing shorts
**Divergence Parameters** (Fully Customizable):
- **Right Lookback**: Bars to right of pivot (default: 5)
- **Left Lookback**: Bars to left of pivot (default: 5)
- **Max Range**: Maximum bars between pivots (default: 60)
- **Min Range**: Minimum bars between pivots (default: 5)
### Configuration Settings
#### KSI Display Settings
- **Show RSI**: Toggle RSI indicator
- **Show CCI**: Toggle both CCI lines
- **Show Williams %R**: Toggle Williams %R (optional)
#### RSI Settings
- **RSI Length**: Period for calculation (default: 22)
- **Data Source**: Price source (default: close)
- **Show Background**: Toggle green/red background
- **Show Cross Labels**: Toggle 50-level crossover labels
#### RSI Divergence Settings
- **Right Lookback**: Pivot detection right side
- **Left Lookback**: Pivot detection left side
- **Max Range**: Maximum lookback distance
- **Min Range**: Minimum lookback distance
- **Show Regular Divergence**: Enable regular divergence lines
- **Show Regular Labels**: Enable regular divergence labels
- **Show Hidden Divergence**: Enable hidden divergence lines
- **Show Hidden Labels**: Enable hidden divergence labels
#### CCI Settings
- **CCI Length**: Short-term period (default: 33)
- **CCI Mid Length**: Medium-term period (default: 77)
- **Data Source**: Price calculation (default: HLC3)
- **Show CCI(33)**: Toggle short-term CCI
- **Show CCI(77)**: Toggle medium-term CCI
#### Williams %R Settings
- **Length**: Calculation period (default: 28)
- **Data Source**: Price source (default: close)
### How to Use
#### For Basic Momentum Trading
1. **Enable RSI Only** (primary indicator)
- Focus on 50-level crossovers
- Enable crossover labels for signals
2. **Identify Momentum Direction**
- RSI > 50 = Bullish momentum
- RSI < 50 = Bearish momentum
- Background color confirms direction
3. **Look for Extremes**
- RSI > 80 = Overbought (consider selling)
- RSI < 20 = Oversold (consider buying)
4. **Trade Setup**
- Enter long when RSI crosses above 50 from oversold
- Enter short when RSI crosses below 50 from overbought
#### For Divergence Trading
1. **Enable RSI with Divergence Detection**
- Turn on regular divergence
- Optionally add hidden divergence
2. **Wait for Divergence Signal**
- Yellow label = Bullish divergence
- Blue label = Bearish divergence
3. **Confirm with Price Structure**
- Wait for support/resistance break
- Look for candlestick patterns
- Check volume confirmation
4. **Enter Position**
- Enter after confirmation
- Stop beyond divergence pivot
- Target next key level
#### For Multi-Oscillator Confirmation
1. **Enable All Three Indicators**
- RSI (momentum)
- CCI dual (cycle analysis)
- Williams %R (extremes)
2. **Look for Alignment**
- All above 50 = Strong bullish
- All below 50 = Strong bearish
- Mixed signals = Consolidation
3. **Identify Extremes**
- All indicators > 80 = Extreme overbought
- All indicators < 20 = Extreme oversold
4. **Trade Reversals**
- Enter counter-trend when all aligned at extremes
- Confirm with divergence if available
- Use tight stops
#### For CCI Dual-Period Analysis
1. **Enable Both CCI Lines**
- CCI(33) = Short-term
- CCI(77) = Medium-term
2. **Watch for Crossovers**
- Green crosses above orange = Bullish acceleration
- Green crosses below orange = Bearish acceleration
3. **Analyze Divergence Between Periods**
- Short-term rising, medium falling = Potential reversal
- Both rising together = Strong trend
4. **Trade Accordingly**
- Follow crossover direction
- Exit when lines converge
### Trading Strategies
#### Strategy 1: RSI 50-Level Crossover
**Setup:**
- Enable RSI with background and labels
- Wait for clear trend
- Look for retracement to 50 level
**Entry:**
- Long: "突破" label appears after pullback
- Short: "跌破" label appears after bounce
**Stop Loss:**
- Long: Below recent swing low
- Short: Above recent swing high
**Exit:**
- Opposite crossover label
- Or predetermined target (2:1 risk-reward)
**Best For:** Trend following, clear markets
#### Strategy 2: RSI Divergence Reversal
**Setup:**
- Enable RSI with regular divergence
- Wait for extreme levels (>70 or <30)
- Look for divergence signal
**Entry:**
- Long: Yellow "涨" label at oversold level
- Short: Blue "跌" label at overbought level
**Confirmation:**
- Wait for price to break structure
- Check for volume increase
- Look for candlestick reversal pattern
**Stop Loss:**
- Beyond divergence pivot point
**Exit:**
- Take partial profit at 50 level
- Exit remainder at opposite extreme or divergence
**Best For:** Swing trading, range-bound markets
#### Strategy 3: Triple Oscillator Confluence
**Setup:**
- Enable all three indicators
- Wait for all to reach extreme (>80 or <20)
- Look for alignment
**Entry:**
- Long: All three below 20, first one crosses above 20
- Short: All three above 80, first one crosses below 80
**Confirmation:**
- All indicators must align
- Price at support/resistance
- Volume spike helps
**Stop Loss:**
- Fixed percentage or ATR-based
**Exit:**
- When any indicator crosses 50 level
- Or at predetermined target
**Best For:** High-probability reversals, volatile markets
#### Strategy 4: CCI Dual-Period System
**Setup:**
- Enable both CCI lines only
- Disable RSI and Williams %R for clarity
- Watch for crossovers
**Entry:**
- Long: CCI(33) crosses above CCI(77) below 50 line
- Short: CCI(33) crosses below CCI(77) above 50 line
**Confirmation:**
- Both should be moving in entry direction
- Price breaking key level helps
**Stop Loss:**
- When CCIs cross back in opposite direction
**Exit:**
- Both CCIs enter opposite extreme zone
- Or trailing stop
**Best For:** Catching trend continuations, momentum trading
#### Strategy 5: Hidden Divergence Continuation
**Setup:**
- Enable RSI with hidden divergence
- Confirm existing trend
- Wait for pullback
**Entry:**
- Uptrend: "隐涨" label during pullback
- Downtrend: "隐跌" label during bounce
**Confirmation:**
- Price holds key moving average
- Trend structure intact
**Stop Loss:**
- Beyond pullback extreme
**Exit:**
- Regular divergence appears (reversal warning)
- Or trend structure breaks
**Best For:** Adding to positions, trend trading
### Best Practices
#### Choosing Which Indicators to Display
**For Beginners:**
- Use RSI only
- Enable background color and labels
- Focus on 50-level crossovers
- Simple and effective
**For Intermediate Traders:**
- RSI + Regular Divergence
- Add CCI for confirmation
- Use dual perspectives
- Better accuracy
**For Advanced Traders:**
- All three indicators
- Full divergence detection
- Multi-timeframe analysis
- Maximum information
#### Oscillator Priority
**Primary**: RSI (22)
- Most reliable
- Best divergence detection
- Good for all timeframes
- Use this as your main decision maker
**Secondary**: CCI (33/77)
- Adds cycle analysis
- Great for confirmation
- Dual-period crossovers valuable
- Use to confirm RSI signals
**Tertiary**: Williams %R (28)
- Extreme readings useful
- More volatile
- Best for short-term
- Use sparingly for extra confirmation
#### Timeframe Considerations
**Lower Timeframes (1m-15m):**
- More signals, less reliable
- Use tight divergence parameters
- Focus on RSI crossovers
- Quick entries and exits
**Medium Timeframes (30m-4H):**
- Balanced signal frequency
- Default settings work well
- Best for divergence trading
- Swing trading optimal
**Higher Timeframes (Daily+):**
- Fewer but stronger signals
- Widen divergence ranges
- All indicators more reliable
- Position trading best
#### Divergence Trading Tips
1. **Wait for Confirmation**
- Divergence alone isn't enough
- Need price structure break
- Volume helps validate
2. **Best at Extremes**
- Divergences near 80/20 levels most reliable
- Mid-level divergences often fail
- Combine with support/resistance
3. **Multiple Divergences**
- Second divergence stronger than first
- Third divergence extremely powerful
- Watch for "triple divergence"
4. **Timeframe Alignment**
- Check higher timeframe for direction
- Trade divergences in direction of larger trend
- Counter-trend divergences riskier
### Indicator Combinations
**With Moving Averages:**
- Use EMAs (21/55/144) for trend
- KSI for entry timing
- Enter when both align
**With Volume:**
- Volume confirms breakouts
- Divergence + volume divergence = Stronger
- Low volume at extremes = Reversal likely
**With Support/Resistance:**
- Price levels for targets
- KSI for entry timing
- Divergences at levels = Highest probability
**With Bias Indicator:**
- Bias shows price deviation
- KSI shows momentum
- Both diverging = Strong reversal signal
**With OBV Indicator:**
- OBV shows volume trend
- KSI shows price momentum
- Volume/momentum divergence powerful
### Common Patterns
1. **Bullish Reversal**: All oscillators oversold + RSI bullish divergence
2. **Bearish Reversal**: All oscillators overbought + RSI bearish divergence
3. **Trend Acceleration**: RSI > 50, both CCIs rising, Williams %R not extreme
4. **Weakening Trend**: RSI declining while price rising (pre-divergence warning)
5. **Strong Trend**: All oscillators stay above/below 50 for extended period
6. **Consolidation**: Oscillators crossing 50 frequently without extremes
7. **Exhaustion**: Multiple oscillators at extreme + hidden divergence failure
### Performance Tips
- Start simple: RSI only
- Add indicators gradually as you learn
- Disable unused features for cleaner charts
- Use labels strategically (not always on)
- Test different RSI lengths for your market
- Adjust divergence parameters based on volatility
### Alert Conditions
The indicator includes alerts for:
- RSI crossing above 50
- RSI crossing below 50
- RSI regular bullish divergence
- RSI regular bearish divergence
- RSI hidden bullish divergence
- RSI hidden bearish divergence
---
## 中文说明文档
### 概述
Scout Regiment - KSI(关键随机指标)是一个综合性动量振荡器,将三个强大的技术指标 - RSI、CCI和威廉指标 - 组合到一个统一的显示中。这种多指标方法为交易者提供了市场动量、超买超卖状况和通过高级背离检测发现潜在反转点的多元视角。
### 什么是KSI?
KSI代表"关键随机指标" - 一个综合动量指标:
- 显示多个振荡器,标准化到0-100刻度
- 使用标准化波段(20/50/80)便于一致解读
- 结合RSI用于趋势、CCI用于周期、威廉指标用于反转检测
- 专门为RSI提供增强的背离检测
### 核心功能
#### 1. **三重振荡器系统**
**① RSI(相对强弱指数)** - 主要指标
- **用途**:测量动量并识别超买超卖状况
- **默认长度**:22周期
- **显示**:蓝色线(2像素)
- **关键水平**:
- 50以上:看涨动量
- 50以下:看跌动量
- 80以上:超买
- 20以下:超卖
- **特殊功能**:
- 背景颜色指示(绿色/红色)
- 50水平穿越标签
- 完整背离检测(4种类型)
**② CCI(顺势指标)** - 双周期
- **用途**:识别周期性趋势和极端状况
- **双重显示**:
- CCI(33):短期周期 - 绿色线(1像素)
- CCI(77):中期周期 - 橙色线(1像素)
- **默认数据源**:HLC3(典型价格)
- **标准化刻度**:从±100映射到0-100以保持一致性
- **解读**:
- 80以上:强劲上升动量
- 20以下:强劲下降动量
- 50水平:中性
- 周期间背离:趋势变化警告
**③ 威廉指标 %R** - 可选
- **用途**:识别超买超卖极值
- **默认长度**:28周期
- **显示**:洋红色线(2像素)
- **刻度**:反转并标准化到0-100
- **最适合**:短期反转信号
- **默认**:禁用(需要额外确认时启用)
#### 2. **标准化波段系统**
**三层结构:**
- **上轨(80)**:超买区域
- 强动量区域
- 注意反转信号
- 此处的背离最可靠
- **中线(50)**:均衡线
- 分隔看涨/看跌区域
- 穿越表示动量转变
- 关键决策水平
- **下轨(20)**:超卖区域
- 弱动量区域
- 寻找反弹信号
- 此处的背离预示潜在反转
**波段填充**:20-80之间的深色背景,增强视觉清晰度
#### 3. **RSI视觉增强**
**背景颜色指示**
- 绿色背景:RSI在50以上(看涨偏向)
- 红色背景:RSI在50以下(看跌偏向)
- 可选显示,图表更清爽
- 帮助识别整体动量方向
**穿越标签**
- "突破":RSI向上穿越50
- "跌破":RSI向下穿越50
- 标记动量转变点
- 可开关
#### 4. **高级RSI背离检测**
指标仅为RSI(最可靠的振荡器)提供全面背离检测:
**常规看涨背离(黄色)**
- **价格**:更低的低点
- **RSI**:更高的低点
- **信号**:潜在向上反转
- **标签**:"涨"
- **最常见**:在超卖水平附近(30以下)
**常规看跌背离(蓝色)**
- **价格**:更高的高点
- **RSI**:更低的高点
- **信号**:潜在向下反转
- **标签**:"跌"
- **最常见**:在超买水平附近(70以上)
**隐藏看涨背离(浅黄色)**
- **价格**:更高的低点
- **RSI**:更低的低点
- **信号**:上升趋势延续
- **标签**:"隐涨"
- **用途**:加仓现有多头
**隐藏看跌背离(浅蓝色)**
- **价格**:更低的高点
- **RSI**:更高的高点
- **信号**:下降趋势延续
- **标签**:"隐跌"
- **用途**:加仓现有空头
**背离参数**(完全可自定义):
- **右侧回溯**:枢轴点右侧K线数(默认:5)
- **左侧回溯**:枢轴点左侧K线数(默认:5)
- **最大范围**:枢轴点之间最大K线数(默认:60)
- **最小范围**:枢轴点之间最小K线数(默认:5)
### 配置设置
#### KSI显示设置
- **显示RSI**:切换RSI指标
- **显示CCI**:切换两条CCI线
- **显示威廉指标 %R**:切换威廉指标(可选)
#### RSI设置
- **RSI长度**:计算周期(默认:22)
- **数据源**:价格源(默认:收盘价)
- **显示背景**:切换绿色/红色背景
- **显示穿越标签**:切换50水平穿越标签
#### RSI背离设置
- **右侧回溯**:枢轴检测右侧
- **左侧回溯**:枢轴检测左侧
- **回溯范围最大值**:最大回溯距离
- **回溯范围最小值**:最小回溯距离
- **显示常规背离**:启用常规背离线
- **显示常规背离标签**:启用常规背离标签
- **显示隐藏背离**:启用隐藏背离线
- **显示隐藏背离标签**:启用隐藏背离标签
#### CCI设置
- **CCI长度**:短期周期(默认:33)
- **CCI中期长度**:中期周期(默认:77)
- **数据源**:价格计算(默认:HLC3)
- **显示CCI(33)**:切换短期CCI
- **显示CCI(77)**:切换中期CCI
#### 威廉指标 %R 设置
- **长度**:计算周期(默认:28)
- **数据源**:价格源(默认:收盘价)
### 使用方法
#### 基础动量交易
1. **仅启用RSI**(主要指标)
- 关注50水平穿越
- 启用穿越标签获取信号
2. **识别动量方向**
- RSI > 50 = 看涨动量
- RSI < 50 = 看跌动量
- 背景颜色确认方向
3. **寻找极值**
- RSI > 80 = 超买(考虑卖出)
- RSI < 20 = 超卖(考虑买入)
4. **交易设置**
- RSI从超卖区向上穿越50时做多
- RSI从超买区向下穿越50时做空
#### 背离交易
1. **启用RSI和背离检测**
- 打开常规背离
- 可选添加隐藏背离
2. **等待背离信号**
- 黄色标签 = 看涨背离
- 蓝色标签 = 看跌背离
3. **用价格结构确认**
- 等待支撑/阻力突破
- 寻找K线形态
- 检查成交量确认
4. **进入仓位**
- 确认后进入
- 止损设在背离枢轴点之外
- 目标下一个关键水平
#### 多振荡器确认
1. **启用全部三个指标**
- RSI(动量)
- CCI双周期(周期分析)
- 威廉指标 %R(极值)
2. **寻找一致性**
- 全部在50以上 = 强劲看涨
- 全部在50以下 = 强劲看跌
- 信号混合 = 盘整
3. **识别极值**
- 所有指标 > 80 = 极度超买
- 所有指标 < 20 = 极度超卖
4. **交易反转**
- 所有指标在极值一致时逆势进入
- 可能的话用背离确认
- 使用紧密止损
#### CCI双周期分析
1. **启用两条CCI线**
- CCI(33) = 短期
- CCI(77) = 中期
2. **观察穿越**
- 绿色线穿越橙色线向上 = 看涨加速
- 绿色线穿越橙色线向下 = 看跌加速
3. **分析周期间背离**
- 短期上升,中期下降 = 潜在反转
- 两者同时上升 = 强趋势
4. **相应交易**
- 跟随穿越方向
- 线条汇合时退出
### 交易策略
#### 策略1:RSI 50水平穿越
**设置:**
- 启用RSI及背景和标签
- 等待明确趋势
- 寻找回调至50水平
**入场:**
- 多头:回调后出现"突破"标签
- 空头:反弹后出现"跌破"标签
**止损:**
- 多头:近期波动低点之下
- 空头:近期波动高点之上
**离场:**
- 出现相反穿越标签
- 或预定目标(2:1风险收益比)
**适合:**趋势跟随、明确市场
#### 策略2:RSI背离反转
**设置:**
- 启用RSI和常规背离
- 等待极端水平(>70或<30)
- 寻找背离信号
**入场:**
- 多头:超卖水平出现黄色"涨"标签
- 空头:超买水平出现蓝色"跌"标签
**确认:**
- 等待价格突破结构
- 检查成交量增加
- 寻找K线反转形态
**止损:**
- 背离枢轴点之外
**离场:**
- 在50水平部分获利
- 其余在相反极值或背离处离场
**适合:**波段交易、震荡市场
#### 策略3:三重振荡器汇合
**设置:**
- 启用全部三个指标
- 等待全部达到极值(>80或<20)
- 寻找一致性
**入场:**
- 多头:三个全部低于20,第一个向上穿越20
- 空头:三个全部高于80,第一个向下穿越80
**确认:**
- 所有指标必须一致
- 价格在支撑/阻力位
- 成交量激增有帮助
**止损:**
- 固定百分比或基于ATR
**离场:**
- 任一指标穿越50水平时
- 或在预定目标
**适合:**高概率反转、波动市场
#### 策略4:CCI双周期系统
**设置:**
- 仅启用两条CCI线
- 禁用RSI和威廉指标以保持清晰
- 观察穿越
**入场:**
- 多头:CCI(33)在50线下方向上穿越CCI(77)
- 空头:CCI(33)在50线上方向下穿越CCI(77)
**确认:**
- 两者都应朝入场方向移动
- 价格突破关键水平有帮助
**止损:**
- CCI反向穿越时
**离场:**
- 两条CCI进入相反极值区域
- 或移动止损
**适合:**捕捉趋势延续、动量交易
#### 策略5:隐藏背离延续
**设置:**
- 启用RSI和隐藏背离
- 确认现有趋势
- 等待回调
**入场:**
- 上升趋势:回调期间出现"隐涨"标签
- 下降趋势:反弹期间出现"隐跌"标签
**确认:**
- 价格守住关键移动平均线
- 趋势结构完整
**止损:**
- 回调极值之外
**离场:**
- 出现常规背离(反转警告)
- 或趋势结构破坏
**适合:**加仓、趋势交易
### 最佳实践
#### 选择显示哪些指标
**新手:**
- 仅使用RSI
- 启用背景颜色和标签
- 关注50水平穿越
- 简单有效
**中级交易者:**
- RSI + 常规背离
- 添加CCI确认
- 使用双重视角
- 更高准确度
**高级交易者:**
- 全部三个指标
- 完整背离检测
- 多时间框架分析
- 信息最大化
#### 振荡器优先级
**主要**:RSI (22)
- 最可靠
- 最佳背离检测
- 适用所有时间框架
- 用作主要决策依据
**次要**:CCI (33/77)
- 添加周期分析
- 确认效果好
- 双周期穿越有价值
- 用于确认RSI信号
**第三**:威廉指标 %R (28)
- 极值读数有用
- 更波动
- 最适合短期
- 谨慎使用以获额外确认
#### 时间框架考虑
**低时间框架(1分钟-15分钟):**
- 更多信号,可靠性较低
- 使用紧密背离参数
- 关注RSI穿越
- 快速进出
**中等时间框架(30分钟-4小时):**
- 信号频率平衡
- 默认设置效果好
- 最适合背离交易
- 波段交易最优
**高时间框架(日线+):**
- 信号较少但更强
- 扩大背离范围
- 所有指标更可靠
- 最适合仓位交易
#### 背离交易技巧
1. **等待确认**
- 仅背离不够
- 需要价格结构突破
- 成交量帮助验证
2. **极值处最佳**
- 80/20水平附近的背离最可靠
- 中间水平背离常失败
- 结合支撑/阻力
3. **多重背离**
- 第二次背离强于第一次
- 第三次背离极其强大
- 注意"三重背离"
4. **时间框架对齐**
- 检查更高时间框架方向
- 顺大趋势方向交易背离
- 逆势背离风险更大
### 指标组合
**与移动平均线配合:**
- 使用EMA(21/55/144)确定趋势
- KSI用于入场时机
- 两者一致时进入
**与成交量配合:**
- 成交量确认突破
- 背离 + 成交量背离 = 更强
- 极值处低成交量 = 可能反转
**与支撑/阻力配合:**
- 价格水平作为目标
- KSI用于入场时机
- 水平处的背离 = 最高概率
**与Bias指标配合:**
- Bias显示价格偏离
- KSI显示动量
- 两者都背离 = 强反转信号
**与OBV指标配合:**
- OBV显示成交量趋势
- KSI显示价格动量
- 成交量/动量背离强大
### 常见形态
1. **看涨反转**:所有振荡器超卖 + RSI看涨背离
2. **看跌反转**:所有振荡器超买 + RSI看跌背离
3. **趋势加速**:RSI > 50,两条CCI上升,威廉指标不极端
4. **趋势减弱**:价格上升时RSI下降(背离前警告)
5. **强趋势**:所有振荡器长时间保持在50上方/下方
6. **盘整**:振荡器频繁穿越50无极值
7. **衰竭**:多个振荡器在极值 + 隐藏背离失败
### 性能提示
- 从简单开始:仅RSI
- 学习时逐渐添加指标
- 禁用未使用功能以保持图表清晰
- 策略性使用标签(不总是开启)
- 为您的市场测试不同RSI长度
- 根据波动性调整背离参数
### 警报条件
指标包含以下警报:
- RSI向上穿越50
- RSI向下穿越50
- RSI常规看涨背离
- RSI常规看跌背离
- RSI隐藏看涨背离
- RSI隐藏看跌背离
---
## Technical Support
For questions or issues, please refer to the TradingView community or contact the indicator creator.
## 技术支持
如有问题,请参考TradingView社区或联系指标创建者。
Scout Regiment - OBV# Scout Regiment - OBV Indicator
## English Documentation
### Overview
Scout Regiment - OBV (On-Balance Volume) is an advanced momentum indicator that combines volume and price movement to identify the strength of buying and selling pressure. This indicator features an oscillator-based approach with divergence detection to help traders spot potential trend reversals and confirm price movements.
### What is OBV?
On-Balance Volume (OBV) is a cumulative volume indicator that adds volume on up days and subtracts volume on down days:
- **Rising OBV**: Accumulation (buying pressure)
- **Falling OBV**: Distribution (selling pressure)
- **OBV Oscillator**: The difference between OBV and its smoothed moving average, making divergences easier to spot
### Key Features
#### 1. **OBV Oscillator Display**
Instead of displaying raw OBV values, this indicator shows the oscillator (difference between OBV and its smoothed line):
**Benefits:**
- Easier to identify divergences
- Clearer trend changes
- More sensitive to momentum shifts
- Zero line as reference point
**Visual Elements:**
- **Step Line**: Main OBV oscillator line
- Green: Positive oscillator (accumulation)
- Red: Negative oscillator (distribution)
- **Histogram**: Visual representation of oscillator strength
- Green bars: Above zero line
- Red bars: Below zero line
- **Zero Line**: White dotted horizontal line as reference
#### 2. **Smoothing Options**
Choose from multiple moving average types to smooth the OBV:
- **None**: Raw OBV (most sensitive)
- **SMA**: Simple Moving Average (equal weight)
- **EMA**: Exponential Moving Average (recent price emphasis) - Default
- **SMMA (RMA)**: Smoothed Moving Average (very smooth)
- **WMA**: Weighted Moving Average (linear weight)
- **VWMA**: Volume Weighted Moving Average (volume emphasis)
**Default Settings:**
- Type: EMA
- Length: 21 periods
- Best for: Most market conditions
#### 3. **Multi-Timeframe Analysis**
- Calculate OBV on any timeframe
- View higher timeframe momentum on lower timeframe charts
- Align trades with larger timeframe volume trends
- Empty field = Current chart timeframe
#### 4. **Visual Enhancements**
**Background Color**
- Light green: Positive oscillator (bullish volume pressure)
- Light red: Negative oscillator (bearish volume pressure)
- Optional display for cleaner charts
**Crossover Labels**
- "突破" (Breakout): When oscillator crosses above zero
- "跌破" (Breakdown): When oscillator crosses below zero
- Indicates potential trend changes
- Can be toggled on/off
#### 5. **Comprehensive Divergence Detection**
The indicator automatically detects four types of divergences:
**Regular Bullish Divergence (Yellow)**
- **Price**: Makes lower lows
- **OBV**: Makes higher lows
- **Signal**: Potential upward reversal
- **Label**: "看涨" (Bullish)
- **Use**: Enter long positions
**Regular Bearish Divergence (Blue)**
- **Price**: Makes higher highs
- **OBV**: Makes lower highs
- **Signal**: Potential downward reversal
- **Label**: "看跌" (Bearish)
- **Use**: Enter short positions or exit longs
**Hidden Bullish Divergence (Light Yellow)**
- **Price**: Makes higher lows
- **OBV**: Makes lower lows
- **Signal**: Trend continuation (uptrend)
- **Label**: "隐藏看涨" (Hidden Bullish)
- **Use**: Add to long positions
**Hidden Bearish Divergence (Light Blue)**
- **Price**: Makes lower highs
- **OBV**: Makes higher highs
- **Signal**: Trend continuation (downtrend)
- **Label**: "隐藏看跌" (Hidden Bearish)
- **Use**: Add to short positions
#### 6. **Customizable Divergence Detection**
**Pivot Lookback Settings:**
- **Left Lookback**: Bars to the left of pivot (default: 5)
- **Right Lookback**: Bars to the right of pivot (default: 5)
- Determines how "extreme" a point must be to qualify as a pivot
**Range Settings:**
- **Maximum Range**: Maximum bars between pivots (default: 60)
- **Minimum Range**: Minimum bars between pivots (default: 5)
- Filters out too-close or too-distant divergences
**Display Options:**
- Toggle regular divergences on/off
- Toggle hidden divergences on/off
- Toggle divergence labels on/off
- Show only the divergences you need
### Configuration Settings
#### Smoothing Settings
- **Smoothing Type**: Choose MA type (None/SMA/EMA/SMMA/WMA/VWMA)
- **Smoothing Length**: Number of periods for smoothing (default: 21)
#### Calculation Settings
- **Timeframe**: Select calculation timeframe (empty = current chart)
#### Display Settings
- **Show OBV Line**: Toggle step line display
- **Show OBV Histogram**: Toggle histogram display
- **Show Background Color**: Toggle background coloring
- **Show Crossover Labels**: Toggle breakout/breakdown labels
#### Divergence Settings
- **Pivot Right Lookback**: Right bars for pivot detection (default: 5)
- **Pivot Left Lookback**: Left bars for pivot detection (default: 5)
- **Range Maximum**: Max bars between divergences (default: 60)
- **Range Minimum**: Min bars between divergences (default: 5)
- **Show Regular Divergences**: Enable/disable regular divergences
- **Show Regular Labels**: Enable/disable regular divergence labels
- **Show Hidden Divergences**: Enable/disable hidden divergences
- **Show Hidden Labels**: Enable/disable hidden divergence labels
### How to Use
#### For Trend Confirmation
1. **Identify Trend with Price**
- Uptrend: Higher highs and higher lows
- Downtrend: Lower highs and lower lows
2. **Confirm with OBV Oscillator**
- Strong uptrend: OBV oscillator staying positive
- Strong downtrend: OBV oscillator staying negative
- Weak trend: OBV oscillator frequently crossing zero
3. **Volume Confirmation**
- Trend with increasing OBV = Strong trend
- Trend with decreasing OBV = Weak trend (watch for reversal)
#### For Divergence Trading
1. **Enable Divergence Detection**
- Start with regular divergences only
- Add hidden divergences for trend continuation
2. **Wait for Divergence Signal**
- Yellow label = Potential bullish reversal
- Blue label = Potential bearish reversal
3. **Confirm with Price Action**
- Wait for support/resistance break
- Look for candlestick confirmation
- Check higher timeframe alignment
4. **Enter Trade**
- Enter after confirmation
- Set stop loss beyond recent swing
- Target based on previous swing or support/resistance
#### For Breakout Trading
1. **Enable Crossover Labels**
- Identify when oscillator crosses zero line
2. **Confirm Volume Strength**
- Strong breakouts have large oscillator moves
- Weak breakouts barely cross zero
3. **Trade Direction**
- "突破" label = Enter long
- "跌破" label = Enter short
4. **Manage Position**
- Exit when oscillator crosses back
- Use price structure for stops
#### For Multi-Timeframe Analysis
1. **Set Higher Timeframe**
- Example: On 15min chart, set timeframe to 1H or 4H
2. **Identify Higher Timeframe Trend**
- Positive oscillator = Uptrend bias
- Negative oscillator = Downtrend bias
3. **Trade with the Trend**
- Only take long signals in uptrend
- Only take short signals in downtrend
4. **Time Entries**
- Use current timeframe for precise entry
- Confirm with higher timeframe direction
### Trading Strategies
#### Strategy 1: Regular Divergence Reversal
**Setup:**
1. Price in strong trend (up or down)
2. Regular divergence appears
3. Price reaches support/resistance level
**Entry:**
- Bullish: After "看涨" label, when price breaks above recent high
- Bearish: After "看跌" label, when price breaks below recent low
**Stop Loss:**
- Bullish: Below divergence low
- Bearish: Above divergence high
**Exit:**
- Take profit at next major support/resistance
- Or when opposite divergence appears
**Best For:** Swing trading, reversal trading
#### Strategy 2: Hidden Divergence Continuation
**Setup:**
1. Clear trend established
2. Price pulls back (retracement)
3. Hidden divergence appears
**Entry:**
- Bullish: After "隐藏看涨" label, when price resumes uptrend
- Bearish: After "隐藏看跌" label, when price resumes downtrend
**Stop Loss:**
- Behind the pullback swing point
**Exit:**
- Trail stop as trend continues
- Exit on regular divergence (reversal signal)
**Best For:** Trend following, adding to positions
#### Strategy 3: Zero Line Crossover
**Setup:**
1. Enable crossover labels
2. Oscillator crosses zero line
3. Confirm with price structure break
**Entry:**
- "突破" label = Buy signal
- "跌破" label = Sell signal
**Stop Loss:**
- Below/above recent swing
**Exit:**
- When oscillator crosses back over zero
- Or at predetermined target
**Best For:** Momentum trading, quick trades
#### Strategy 4: Multi-Timeframe Confluence
**Setup:**
1. Set indicator to higher timeframe (e.g., 4H on 1H chart)
2. Wait for higher TF oscillator to be positive (uptrend) or negative (downtrend)
3. Look for entries on current timeframe aligned with higher TF
**Entry:**
- Long: When both timeframes show positive oscillator or bullish divergence
- Short: When both timeframes show negative oscillator or bearish divergence
**Stop Loss:**
- Based on current timeframe structure
**Exit:**
- When higher timeframe oscillator turns negative (for longs) or positive (for shorts)
**Best For:** Swing trading, high-probability setups
### Best Practices
#### Volume Analysis
1. **Strong Moves Need Volume**
- Price increase + Rising OBV = Healthy uptrend
- Price increase + Falling OBV = Weak uptrend (warning)
2. **Watch for Confirmation**
- New highs with new OBV highs = Confirmed
- New highs without new OBV highs = Potential divergence
3. **Consider Context**
- Low volume periods (Asian session, holidays) = Less reliable
- High volume periods (News, London/NY overlap) = More reliable
#### Divergence Trading Tips
1. **Not All Divergences Work**
- Wait for price confirmation
- Stronger in oversold/overbought areas
- Better at support/resistance levels
2. **Multiple Divergences**
- Multiple divergences on same trend = Stronger signal
- Quick divergence failures = Ignore and wait for next
3. **Timeframe Matters**
- Higher timeframe divergences = More reliable
- Lower timeframe divergences = More frequent, less reliable
#### Smoothing Selection
1. **No Smoothing (None)**
- Most sensitive, more signals
- More noise, more false signals
- Best for: Scalping, very active trading
2. **EMA (Default)**
- Balanced approach
- Good for most strategies
- Best for: Swing trading, day trading
3. **SMMA (RMA)**
- Very smooth, fewer signals
- Less responsive to sudden changes
- Best for: Position trading, longer timeframes
### Indicator Combinations
**With Moving Averages:**
- Use EMAs for trend direction
- OBV for volume confirmation
- Enter when both align
**With RSI:**
- RSI for overbought/oversold
- OBV for volume confirmation
- Divergences on both = Stronger signal
**With Price Action:**
- Support/resistance for levels
- OBV for strength confirmation
- Breakouts with positive OBV = More likely to succeed
**With Bias Indicator:**
- Bias for price deviation
- OBV for volume confirmation
- Both showing divergence = High probability reversal
### Common Patterns
1. **Accumulation**: OBV rising while price consolidates (breakout likely)
2. **Distribution**: OBV falling while price consolidates (breakdown likely)
3. **Confirmation**: OBV and price both making new highs/lows (trend strong)
4. **Divergence**: OBV and price moving opposite directions (reversal warning)
5. **False Breakout**: Price breaks but OBV doesn't confirm (likely to fail)
### Performance Tips
- Disable unused display features for faster loading
- Start with regular divergences only, add hidden later
- Use histogram for quick visual reference
- Enable crossover labels for clear entry signals
- Test different smoothing lengths for your market
### Alert Conditions
The indicator includes alerts for:
- Regular bullish divergence detected
- Regular bearish divergence detected
- Hidden bullish divergence detected
- Hidden bearish divergence detected
**How to Set Alerts:**
1. Click on the indicator name
2. Select "Add Alert"
3. Choose condition
4. Configure notification method
---
## 中文说明文档
### 概述
Scout Regiment - OBV(能量潮)是一个高级动量指标,结合成交量和价格变动来识别买卖压力的强度。该指标采用振荡器方法并具有背离检测功能,帮助交易者发现潜在的趋势反转并确认价格走势。
### 什么是OBV?
能量潮(OBV)是一个累积成交量指标,在上涨日累加成交量,在下跌日减去成交量:
- **上升的OBV**:积累(买入压力)
- **下降的OBV**:派发(卖出压力)
- **OBV振荡器**:OBV与其平滑移动平均线之间的差值,使背离更容易识别
### 核心功能
#### 1. **OBV振荡器显示**
该指标不显示原始OBV值,而是显示振荡器(OBV与其平滑线之间的差值):
**优势:**
- 更容易识别背离
- 趋势变化更清晰
- 对动量变化更敏感
- 零线作为参考点
**视觉元素:**
- **阶梯线**:主OBV振荡器线
- 绿色:正振荡器(积累)
- 红色:负振荡器(派发)
- **柱状图**:振荡器强度的可视化表示
- 绿色柱:零线以上
- 红色柱:零线以下
- **零线**:白色虚线作为参考
#### 2. **平滑选项**
选择多种移动平均类型来平滑OBV:
- **None**:原始OBV(最敏感)
- **SMA**:简单移动平均(等权重)
- **EMA**:指数移动平均(强调近期价格)- 默认
- **SMMA (RMA)**:平滑移动平均(非常平滑)
- **WMA**:加权移动平均(线性权重)
- **VWMA**:成交量加权移动平均(强调成交量)
**默认设置:**
- 类型:EMA
- 长度:21周期
- 适合:大多数市场状况
#### 3. **多时间框架分析**
- 在任何时间框架上计算OBV
- 在低时间框架图表上查看高时间框架动量
- 使交易与更大时间框架的成交量趋势保持一致
- 空字段 = 当前图表时间框架
#### 4. **视觉增强**
**背景颜色**
- 浅绿色:正振荡器(看涨成交量压力)
- 浅红色:负振荡器(看跌成交量压力)
- 可选显示,图表更清爽
**穿越标签**
- "突破":振荡器向上穿越零线
- "跌破":振荡器向下穿越零线
- 指示潜在趋势变化
- 可开关
#### 5. **全面的背离检测**
指标自动检测四种类型的背离:
**常规看涨背离(黄色)**
- **价格**:创新低
- **OBV**:创更高的低点
- **信号**:潜在向上反转
- **标签**:"看涨"
- **用途**:进入多头仓位
**常规看跌背离(蓝色)**
- **价格**:创新高
- **OBV**:创更低的高点
- **信号**:潜在向下反转
- **标签**:"看跌"
- **用途**:进入空头仓位或退出多头
**隐藏看涨背离(浅黄色)**
- **价格**:创更高的低点
- **OBV**:创更低的低点
- **信号**:趋势延续(上升趋势)
- **标签**:"隐藏看涨"
- **用途**:加仓多头
**隐藏看跌背离(浅蓝色)**
- **价格**:创更低的高点
- **OBV**:创更高的高点
- **信号**:趋势延续(下降趋势)
- **标签**:"隐藏看跌"
- **用途**:加仓空头
#### 6. **可自定义的背离检测**
**枢轴回溯设置:**
- **左侧回溯**:枢轴点左侧K线数(默认:5)
- **右侧回溯**:枢轴点右侧K线数(默认:5)
- 决定一个点要多"极端"才能成为枢轴点
**范围设置:**
- **最大范围**:枢轴点之间最大K线数(默认:60)
- **最小范围**:枢轴点之间最小K线数(默认:5)
- 过滤太近或太远的背离
**显示选项:**
- 开关常规背离
- 开关隐藏背离
- 开关背离标签
- 只显示需要的背离
### 配置设置
#### 平滑设置
- **平滑类型**:选择MA类型(None/SMA/EMA/SMMA/WMA/VWMA)
- **平滑长度**:平滑周期数(默认:21)
#### 计算设置
- **时间周期**:选择计算时间框架(空 = 当前图表)
#### 显示设置
- **显示OBV点线**:切换阶梯线显示
- **显示OBV柱状图**:切换柱状图显示
- **显示背景颜色**:切换背景着色
- **显示突破标签**:切换突破/跌破标签
#### 背离设置
- **枢轴右侧回溯**:枢轴检测右侧K线数(默认:5)
- **枢轴左侧回溯**:枢轴检测左侧K线数(默认:5)
- **回看范围最大值**:背离之间最大K线数(默认:60)
- **回看范围最小值**:背离之间最小K线数(默认:5)
- **显示常规背离**:启用/禁用常规背离
- **显示常规背离标签**:启用/禁用常规背离标签
- **显示隐藏背离**:启用/禁用隐藏背离
- **显示隐藏背离标签**:启用/禁用隐藏背离标签
### 使用方法
#### 趋势确认
1. **用价格识别趋势**
- 上升趋势:更高的高点和更高的低点
- 下降趋势:更低的高点和更低的低点
2. **用OBV振荡器确认**
- 强劲上升趋势:OBV振荡器保持正值
- 强劲下降趋势:OBV振荡器保持负值
- 弱势趋势:OBV振荡器频繁穿越零线
3. **成交量确认**
- 趋势伴随上升的OBV = 强趋势
- 趋势伴随下降的OBV = 弱趋势(注意反转)
#### 背离交易
1. **启用背离检测**
- 先从常规背离开始
- 添加隐藏背离用于趋势延续
2. **等待背离信号**
- 黄色标签 = 潜在看涨反转
- 蓝色标签 = 潜在看跌反转
3. **用价格行为确认**
- 等待支撑/阻力突破
- 寻找K线确认
- 检查更高时间框架对齐
4. **进入交易**
- 确认后进入
- 在近期波动之外设置止损
- 基于前一波动或支撑/阻力设定目标
#### 突破交易
1. **启用穿越标签**
- 识别振荡器何时穿越零线
2. **确认成交量强度**
- 强突破有大振荡器移动
- 弱突破勉强穿越零线
3. **交易方向**
- "突破"标签 = 进入多头
- "跌破"标签 = 进入空头
4. **管理仓位**
- 振荡器反向穿越时退出
- 使用价格结构设置止损
#### 多时间框架分析
1. **设置更高时间框架**
- 例如:在15分钟图上,设置时间框架为1H或4H
2. **识别更高时间框架趋势**
- 正振荡器 = 上升趋势偏向
- 负振荡器 = 下降趋势偏向
3. **顺趋势交易**
- 仅在上升趋势中接受多头信号
- 仅在下降趋势中接受空头信号
4. **把握入场时机**
- 使用当前时间框架进行精确进入
- 用更高时间框架方向确认
### 交易策略
#### 策略1:常规背离反转
**设置:**
1. 价格处于强趋势(上涨或下跌)
2. 出现常规背离
3. 价格到达支撑/阻力水平
**入场:**
- 看涨:在"看涨"标签后,价格突破近期高点时
- 看跌:在"看跌"标签后,价格跌破近期低点时
**止损:**
- 看涨:背离低点之下
- 看跌:背离高点之上
**退出:**
- 在下一个主要支撑/阻力获利
- 或出现相反背离时
**适合:**波段交易、反转交易
#### 策略2:隐藏背离延续
**设置:**
1. 建立明确趋势
2. 价格回调(回撤)
3. 出现隐藏背离
**入场:**
- 看涨:在"隐藏看涨"标签后,价格恢复上升趋势时
- 看跌:在"隐藏看跌"标签后,价格恢复下降趋势时
**止损:**
- 在回调波动点之后
**退出:**
- 随着趋势延续移动止损
- 出现常规背离(反转信号)时退出
**适合:**趋势跟随、加仓
#### 策略3:零线穿越
**设置:**
1. 启用穿越标签
2. 振荡器穿越零线
3. 用价格结构突破确认
**入场:**
- "突破"标签 = 买入信号
- "跌破"标签 = 卖出信号
**止损:**
- 近期波动之下/之上
**退出:**
- 振荡器反向穿越零线时
- 或在预定目标
**适合:**动量交易、快速交易
#### 策略4:多时间框架汇合
**设置:**
1. 设置指标到更高时间框架(例如,在1H图上设置4H)
2. 等待更高TF振荡器为正(上升趋势)或负(下降趋势)
3. 在当前时间框架上寻找与更高TF一致的入场机会
**入场:**
- 多头:两个时间框架都显示正振荡器或看涨背离时
- 空头:两个时间框架都显示负振荡器或看跌背离时
**止损:**
- 基于当前时间框架结构
**退出:**
- 更高时间框架振荡器变为负(多头)或正(空头)时
**适合:**波段交易、高概率设置
### 最佳实践
#### 成交量分析
1. **强势波动需要成交量**
- 价格上涨 + 上升的OBV = 健康上升趋势
- 价格上涨 + 下降的OBV = 弱上升趋势(警告)
2. **注意确认**
- 新高伴随新OBV高点 = 已确认
- 新高没有新OBV高点 = 潜在背离
3. **考虑背景**
- 低成交量期(亚洲时段、假期)= 可靠性较低
- 高成交量期(新闻、伦敦/纽约重叠)= 更可靠
#### 背离交易技巧
1. **不是所有背离都有效**
- 等待价格确认
- 在超卖/超买区域更强
- 在支撑/阻力水平更好
2. **多重背离**
- 同一趋势上多个背离 = 更强信号
- 背离快速失败 = 忽略并等待下一个
3. **时间框架重要**
- 更高时间框架背离 = 更可靠
- 更低时间框架背离 = 更频繁,可靠性较低
#### 平滑选择
1. **无平滑(None)**
- 最敏感,更多信号
- 更多噪音,更多假信号
- 适合:剥头皮、非常活跃的交易
2. **EMA(默认)**
- 平衡方法
- 适合大多数策略
- 适合:波段交易、日内交易
3. **SMMA (RMA)**
- 非常平滑,更少信号
- 对突然变化响应较慢
- 适合:仓位交易、更长时间框架
### 指标组合
**与移动平均线配合:**
- 使用EMA确定趋势方向
- OBV确认成交量
- 两者一致时进入
**与RSI配合:**
- RSI用于超买超卖
- OBV用于成交量确认
- 两者都背离 = 更强信号
**与价格行为配合:**
- 支撑/阻力确定水平
- OBV确认强度
- 正OBV的突破 = 更可能成功
**与Bias指标配合:**
- Bias用于价格偏离
- OBV用于成交量确认
- 两者都显示背离 = 高概率反转
### 常见形态
1. **积累**:OBV上升而价格盘整(突破可能)
2. **派发**:OBV下降而价格盘整(跌破可能)
3. **确认**:OBV和价格都创新高/新低(趋势强劲)
4. **背离**:OBV和价格反向移动(反转警告)
5. **假突破**:价格突破但OBV不确认(可能失败)
### 性能提示
- 禁用未使用的显示功能以加快加载
- 先从常规背离开始,稍后添加隐藏背离
- 使用柱状图快速视觉参考
- 启用穿越标签以获得清晰的入场信号
- 为您的市场测试不同的平滑长度
### 警报条件
指标包含以下警报:
- 检测到常规看涨背离
- 检测到常规看跌背离
- 检测到隐藏看涨背离
- 检测到隐藏看跌背离
**如何设置警报:**
1. 点击指标名称
2. 选择"添加警报"
3. 选择条件
4. 配置通知方法
---
## Technical Support
For questions or issues, please refer to the TradingView community or contact the indicator creator.
## 技术支持
如有问题,请参考TradingView社区或联系指标创建者。
Scout Regiment - Bias# Scout Regiment - Bias Indicator
## English Documentation
### Overview
Scout Regiment - Bias is a technical indicator that measures the deviation (bias) between the current price and exponential moving averages (EMAs). It helps traders identify overbought/oversold conditions, trend strength, and potential reversal points through divergence detection.
### What is Bias?
Bias measures how far the price has moved away from a moving average, expressed as a percentage:
- **Positive Bias**: Price is above the EMA (potential overbought)
- **Negative Bias**: Price is below the EMA (potential oversold)
- **Formula**: Bias = (Price - EMA) / EMA × 100
### Key Features
#### 1. **Triple EMA Bias Lines**
The indicator calculates bias from three different EMAs:
- **EMA 55 Bias** (Default: Green/Red, 1px line)
- Short-term bias measurement
- Quick response to price changes
- Best for intraday and swing trading
- **EMA 144 Bias** (Pink, 2px line)
- Medium-term bias measurement
- Balanced response to price movements
- Ideal for swing trading
- **EMA 233 Bias** (White, 2px line)
- Long-term bias measurement
- Slower response, more stable
- Best for position trading
**Color Coding:**
- Green: Price above EMA (bullish)
- Red: Price below EMA (bearish)
#### 2. **Visual Components**
**Histogram Display**
- Shows EMA 55 bias as a histogram for easy visualization
- Green bars: Price above EMA 55
- Red bars: Price below EMA 55
- Can be toggled on/off
**Background Color**
- Light green background: Bullish bias (price above EMA 55)
- Light red background: Bearish bias (price below EMA 55)
- Optional display for cleaner charts
**Zero Line**
- White horizontal line at 0%
- Reference point for positive/negative bias
- Crossovers indicate trend changes
**Crossover Labels**
- "突破" (Breakout): When bias crosses above zero
- "跌破" (Breakdown): When bias crosses below zero
- Can be enabled/disabled for clarity
#### 3. **Divergence Detection**
The indicator automatically detects regular divergences for all three bias lines:
**Bullish Divergence (Yellow Labels)**
- Price makes lower lows
- Bias makes higher lows
- Suggests potential upward reversal
- Labels: "55涨", "144涨", "233涨"
**Bearish Divergence (Blue Labels)**
- Price makes higher highs
- Bias makes lower highs
- Suggests potential downward reversal
- Labels: "55跌", "144跌", "233跌"
**Divergence Parameters** (Customizable for each EMA):
- Left Lookback: Bars to the left of pivot (default: 5)
- Right Lookback: Bars to the right of pivot (default: 1)
- Max Lookback Range: Maximum distance between pivots (default: 60)
- Min Lookback Range: Minimum distance between pivots (default: 5)
### Configuration Settings
#### Bias Settings
- **EMA Periods**: Customize lengths for EMA 55, 144, and 233
- **Price Source**: Choose calculation source (default: close)
- **Enable/Disable**: Toggle each bias line independently
#### Display Settings
- **Show Histogram**: Toggle histogram display
- **Show Background Color**: Toggle background coloring
- **Show Crossover Labels**: Toggle breakout/breakdown labels
#### Divergence Settings (Per EMA)
- Individual controls for EMA 55, 144, and 233 divergences
- Customizable lookback parameters for precision tuning
- Adjustable range settings for different market conditions
### How to Use
#### For Trend Trading
1. **Identify Trend Direction**
- Price above zero = Uptrend
- Price below zero = Downtrend
2. **Confirm with Multiple Timeframes**
- EMA 55: Short-term trend
- EMA 144: Medium-term trend
- EMA 233: Long-term trend
3. **Trade in Direction of Bias**
- All three lines positive = Strong uptrend
- All three lines negative = Strong downtrend
#### For Mean Reversion Trading
1. **Identify Extremes**
- High positive bias (>5-10%) = Overbought
- High negative bias (<-5 to -10%) = Oversold
2. **Wait for Confirmation**
- Look for bias to turn back toward zero
- Watch for crossover labels
3. **Enter on Reversal**
- Enter long when extreme negative bias starts rising
- Enter short when extreme positive bias starts falling
#### For Divergence Trading
1. **Spot Divergence Labels**
- Yellow labels = Bullish divergence (potential buy)
- Blue labels = Bearish divergence (potential sell)
2. **Confirm with Price Action**
- Wait for price to confirm with structure break
- Look for support/resistance reactions
3. **Use Multiple EMAs**
- EMA 55 divergence: Quick reversals
- EMA 144 divergence: Reliable signals
- EMA 233 divergence: Major trend changes
#### For Multi-Timeframe Analysis
1. **Check Long-term Bias** (EMA 233)
- Determines overall market direction
2. **Find Medium-term Entry** (EMA 144)
- Look for pullbacks in long-term trend
3. **Time Short-term Entry** (EMA 55)
- Enter when short-term aligns with longer timeframes
### Trading Strategies
#### Strategy 1: Triple Confirmation
- Wait for all three bias lines to be positive (or negative)
- Enter in direction of unanimous bias
- Exit when any line crosses zero
- Best for: Strong trending markets
#### Strategy 2: Divergence Trading
- Enable all divergence detection
- Take trades only when divergence appears
- Confirm with price structure
- Best for: Range-bound and reversal setups
#### Strategy 3: Zero Line Crossover
- Enable crossover labels
- Enter long on "突破" labels
- Enter short on "跌破" labels
- Use stop loss at recent swing points
- Best for: Trend following
#### Strategy 4: Extreme Reversion
- Wait for bias to reach extremes (>10% or <-10%)
- Enter counter-trend when bias reverses
- Exit at zero line
- Best for: Ranging markets
### Best Practices
1. **Combine with Price Action**
- Don't trade bias alone
- Confirm with support/resistance
- Look for candlestick patterns
2. **Use Multiple Timeframes**
- Check higher timeframe bias
- Trade in direction of larger trend
- Use lower timeframe for entry timing
3. **Manage Risk**
- Set stop losses beyond recent swings
- Don't fight extreme bias in strong trends
- Reduce position size at extremes
4. **Customize for Your Market**
- Volatile assets: Use wider ranges
- Stable assets: Use tighter ranges
- Adjust EMA periods for your timeframe
5. **Watch for False Signals**
- Multiple small divergences = Less reliable
- Divergences at extremes = More reliable
- Confirm with other indicators
### Indicator Combinations
**With Volume:**
- High bias + Low volume = Weak move
- High bias + High volume = Strong move
**With Moving Averages:**
- Check if price is above/below key EMAs
- Bias confirms EMA trend strength
**With RSI/MACD:**
- Multiple indicator divergence = Stronger signal
- Use bias for overbought/oversold confirmation
### Performance Tips
- Disable unused features for faster loading
- Use histogram for quick visual reference
- Enable background color for trend clarity
- Use divergence detection selectively
### Common Patterns
1. **Bias Expansion**: Bias increasing = Strong trend
2. **Bias Contraction**: Bias decreasing = Trend weakening
3. **Zero Line Bounce**: Price respects EMA as support/resistance
4. **Extreme Bias**: Over-extension, watch for reversal
5. **Divergence Cluster**: Multiple EMAs diverging = High probability reversal
### Alert Conditions
You can set alerts for:
- Bias crossing above/below zero
- Extreme bias levels
- Divergence detection
- All three bias lines aligned
---
## 中文说明文档
### 概述
Scout Regiment - Bias 是一个技术指标,用于测量当前价格与指数移动平均线(EMA)之间的偏离程度(乖离率)。它帮助交易者识别超买超卖状况、趋势强度,以及通过背离检测发现潜在的反转点。
### 什么是乖离率?
乖离率衡量价格偏离移动平均线的程度,以百分比表示:
- **正乖离**:价格高于EMA(可能超买)
- **负乖离**:价格低于EMA(可能超卖)
- **计算公式**:乖离率 = (价格 - EMA) / EMA × 100
### 核心功能
#### 1. **三重EMA乖离率线**
指标计算三条不同EMA的乖离率:
- **EMA 55 乖离率**(默认:绿色/红色,1像素线)
- 短期乖离测量
- 对价格变化反应快速
- 适合日内和波段交易
- **EMA 144 乖离率**(粉色,2像素线)
- 中期乖离测量
- 对价格波动反应平衡
- 最适合波段交易
- **EMA 233 乖离率**(白色,2像素线)
- 长期乖离测量
- 反应较慢,更稳定
- 适合仓位交易
**颜色编码:**
- 绿色:价格高于EMA(看涨)
- 红色:价格低于EMA(看跌)
#### 2. **视觉组件**
**柱状图显示**
- 以柱状图形式显示EMA 55乖离率,便于可视化
- 绿色柱:价格高于EMA 55
- 红色柱:价格低于EMA 55
- 可开关显示
**背景颜色**
- 浅绿色背景:看涨乖离(价格高于EMA 55)
- 浅红色背景:看跌乖离(价格低于EMA 55)
- 可选显示,图表更清爽
**零轴**
- 零点位置的白色横线
- 正负乖离的参考点
- 穿越表示趋势变化
**穿越标签**
- "突破":乖离率向上穿越零轴
- "跌破":乖离率向下穿越零轴
- 可启用/禁用以保持清晰
#### 3. **背离检测**
指标自动检测所有三条乖离率线的常规背离:
**看涨背离(黄色标签)**
- 价格创新低
- 乖离率创更高的低点
- 暗示潜在向上反转
- 标签:"55涨"、"144涨"、"233涨"
**看跌背离(蓝色标签)**
- 价格创新高
- 乖离率创更低的高点
- 暗示潜在向下反转
- 标签:"55跌"、"144跌"、"233跌"
**背离参数**(每个EMA可自定义):
- 左侧回溯:枢轴点左侧K线数(默认:5)
- 右侧回溯:枢轴点右侧K线数(默认:1)
- 最大回溯范围:枢轴点之间最大距离(默认:60)
- 最小回溯范围:枢轴点之间最小距离(默认:5)
### 配置设置
#### Bias设置
- **EMA周期**:自定义EMA 55、144和233的长度
- **价格源**:选择计算源(默认:收盘价)
- **启用/禁用**:独立切换每条乖离率线
#### 显示设置
- **显示柱状图**:切换柱状图显示
- **显示背景颜色**:切换背景着色
- **显示突破标签**:切换突破/跌破标签
#### 背离设置(按EMA)
- EMA 55、144和233背离的独立控制
- 可自定义回溯参数用于精确调整
- 可调整范围设置以适应不同市场状况
### 使用方法
#### 趋势交易
1. **识别趋势方向**
- 价格高于零 = 上升趋势
- 价格低于零 = 下降趋势
2. **多时间框架确认**
- EMA 55:短期趋势
- EMA 144:中期趋势
- EMA 233:长期趋势
3. **顺乖离方向交易**
- 三条线全部为正 = 强劲上升趋势
- 三条线全部为负 = 强劲下降趋势
#### 均值回归交易
1. **识别极值**
- 高正乖离(>5-10%)= 超买
- 高负乖离(<-5至-10%)= 超卖
2. **等待确认**
- 等待乖离率回归零轴
- 观察穿越标签
3. **在反转时进场**
- 极端负乖离开始上升时做多
- 极端正乖离开始下降时做空
#### 背离交易
1. **发现背离标签**
- 黄色标签 = 看涨背离(潜在买入)
- 蓝色标签 = 看跌背离(潜在卖出)
2. **用价格行为确认**
- 等待价格通过结构突破确认
- 观察支撑/阻力反应
3. **使用多个EMA**
- EMA 55背离:快速反转
- EMA 144背离:可靠信号
- EMA 233背离:重大趋势变化
#### 多时间框架分析
1. **检查长期乖离**(EMA 233)
- 确定整体市场方向
2. **寻找中期入场**(EMA 144)
- 在长期趋势中寻找回调
3. **把握短期入场时机**(EMA 55)
- 短期与长期时间框架一致时进场
### 交易策略
#### 策略1:三重确认
- 等待三条乖离率线全部为正(或负)
- 顺一致乖离方向入场
- 任一线穿越零轴时离场
- 适合:强趋势市场
#### 策略2:背离交易
- 启用所有背离检测
- 仅在出现背离时交易
- 用价格结构确认
- 适合:震荡和反转设置
#### 策略3:零轴穿越
- 启用穿越标签
- 在"突破"标签时做多
- 在"跌破"标签时做空
- 在近期波动点设置止损
- 适合:趋势跟随
#### 策略4:极值回归
- 等待乖离率达到极值(>10%或<-10%)
- 乖离率反转时逆趋势入场
- 在零轴离场
- 适合:震荡市场
### 最佳实践
1. **结合价格行为**
- 不要单独使用乖离率交易
- 用支撑/阻力确认
- 寻找K线形态
2. **使用多时间框架**
- 检查更高时间框架的乖离
- 顺大趋势方向交易
- 用低时间框架把握入场时机
3. **风险管理**
- 在近期波动之外设置止损
- 不要在强趋势中对抗极端乖离
- 在极值处减少仓位
4. **针对您的市场定制**
- 波动大的资产:使用更宽的范围
- 稳定的资产:使用更紧的范围
- 根据时间框架调整EMA周期
5. **警惕假信号**
- 多个小背离 = 可靠性较低
- 极值处的背离 = 更可靠
- 用其他指标确认
### 指标组合
**与成交量配合:**
- 高乖离 + 低成交量 = 弱势波动
- 高乖离 + 高成交量 = 强势波动
**与移动平均线配合:**
- 检查价格是否在关键EMA上方/下方
- 乖离率确认EMA趋势强度
**与RSI/MACD配合:**
- 多指标背离 = 更强信号
- 使用乖离率确认超买超卖
### 性能提示
- 禁用未使用的功能以加快加载
- 使用柱状图快速视觉参考
- 启用背景颜色以清晰显示趋势
- 有选择地使用背离检测
### 常见形态
1. **乖离扩张**:乖离率增大 = 强趋势
2. **乖离收缩**:乖离率减小 = 趋势减弱
3. **零轴反弹**:价格将EMA作为支撑/阻力
4. **极端乖离**:过度延伸,注意反转
5. **背离集群**:多个EMA背离 = 高概率反转
### 警报条件
您可以为以下情况设置警报:
- 乖离率向上/向下穿越零轴
- 极端乖离水平
- 背离检测
- 三条乖离率线对齐
---
## Technical Support
For questions or issues, please refer to the TradingView community or contact the indicator creator.
## 技术支持
如有问题,请参考TradingView社区或联系指标创建者。
Asymmetric Market Momentum Channel█ OVERVIEW
"Asymmetric Market Momentum Channel" is a dynamic channel indicator that adjusts its width based on the actual strength and asymmetry of market momentum. Thanks to the asymmetric band expansion triggered by strong candles, it significantly reduces false breakouts while remaining highly sensitive to genuine moves.
█ CONCEPTS
Traditional volatility channels react too slowly or too uniformly. This indicator introduces asymmetry:
- After a strong bullish candle with a large body and long upper wick, the upper band is pushed much farther than the lower one.
- After a strong bearish candle, the lower band expands more.
As a result, the channel "remembers" the direction of the last real momentum.
- With wide bands (default base_scale 200+), it excels in contrarian (reversal) strategies – price tends to return to the midline, producing clean reversal signals.
- With narrow bands (base_scale set to 100–150), it behaves like a sensitive breakout channel – breakouts from a tight channel deliver very high-quality trend-continuation signals.
█ FEATURES
Fully adjustable asymmetric momentum channel:
- length – SMA period for midline and average range (default 30)
- base_scale – base channel width in % of average candle range (default 200%)
- strength – asymmetry intensity (higher = stronger expansion after powerful candles)
- smooth_len – EMA smoothing of the expansion (default 10)
Visualization:
- Upper band – red, lower band – green
- Midline SMA – gray
- Gradient background fill (enabled by default) – red above midline, green below; intensity controlled by Background Intensity (85 = strong, 95 = very subtle)
Signal modes:
- Contrarian (Reversal) – reversal signals on price returning inside the channel after exceeding it + confirming candle color
- Trend Continuation (Breakout) – classic breakout signals (recommended to lower base_scale to 100–150 for faster triggers)
- Both – displays both types simultaneously
Visual signals:
- Small green triangles below the bar → bullish signal
- Small red triangles above the bar → bearish signal
Alerts: Bullish Signal, Bearish Signal, Any Signal, Breakout Up, Breakout Down
█ HOW TO USE
Add the indicator to your TradingView chart and adjust the settings:
Key parameter:
- base_scale – defines the indicator’s character:
→ 200–300% → wide channel → Contrarian (reversal) mode
→ 100–150% → narrow channel → Trend Continuation (breakout) mode
- strength (default 1.0)
- length (30) – higher values = smoother, more trend-following behavior
smooth_len (10) – lower values = faster reaction to new momentum
Interpretation:
- Wide channel (base_scale ≥ 200) + Contrarian mode → mean-reversion trading
- Narrow channel (base_scale 100–150) + Breakout mode → aggressive trend-following on breakouts
- Both mode works universally – simply change base_scale to completely switch the indicator’s behavior
█ APPLICATIONS
- Scalping & daytrading – narrow channel + Breakout mode on 5–15 min
- Swing trading – narrow or wide channel + Both mode on H1–D1
- Mean-reversion – wide channel + Contrarian mode
- Trend filter – longs only above midline, shorts only below
█ NOTES
- In very strong one-sided trends, contrarian signals generate many false entries – switch exclusively to Trend Continuation (Breakout) mode with a narrow channel.
- Best performance on instruments with clear volatility and volume.
- Always match base_scale to your strategy (wide = reversal, narrow = breakout).
- Combining with volume, support/resistance levels, or indicators like MACD/RSI dramatically improves signal quality.
OB & FVG IndicatorOB & FVG Indicator
SHORT DESCRIPTION
Clean and simple visualization of Order Blocks (OB) and Fair Value Gaps (FVG) with automatic detection and customizable display settings. Perfect for Smart Money Concepts (SMC) traders.
FULL DESCRIPTION
📊 OVERVIEW
This indicator automatically detects and displays two key Smart Money Concepts (SMC) elements on your chart:
Order Blocks (OB) - Institutional supply and demand zones
Fair Value Gaps (FVG) - Price imbalances that often get revisited
Designed for clarity and simplicity, this tool helps traders identify high-probability reversal zones and potential entry points based on institutional trading behavior.
🔧 KEY FEATURES
Order Blocks Detection:
Automatically identifies bullish OB (last bearish candle before upward move)
Automatically identifies bearish OB (last bullish candle before downward move)
Customizable colors for bullish/bearish zones
Optional labels for easy identification
Minimum size filter to eliminate noise
Fair Value Gaps Detection:
Detects bullish FVG (gap between candle high and previous candle low)
Detects bearish FVG (gap between candle low and previous candle high)
Color-coded zones for instant recognition
Auto-deletion of filled gaps (optional)
Minimum size filter in pips
Visual Customization:
Adjustable transparency levels
Custom color schemes for all elements
Configurable box extension length
Toggle labels on/off
Clean, non-cluttered chart display
Performance Optimization:
Automatic deletion of old boxes to maintain chart performance
Maximum 100 boxes stored at once
Lightweight code for fast rendering
⚙️ HOW TO USE
1. Installation
Click "Add to Chart"
The indicator will appear on your chart overlay
2. Configuration
Open Settings panel (gear icon)
Customize colors, transparency, and filters under respective groups
Adjust minimum size filters to match your trading style and timeframe
3. Interpretation
Order Blocks:
Blue zones = Bullish OB (potential support/demand)
Orange zones = Bearish OB (potential resistance/supply)
Price often reacts strongly when revisiting these zones
Fair Value Gaps:
Green zones = Bullish FVG (potential retracement target in uptrends)
Red zones = Bearish FVG (potential retracement target in downtrends)
Gaps are often "filled" before continuation moves
📈 BEST PRACTICES
Timeframe Recommendations:
15m - 1H charts: Best for intraday trading
4H - Daily charts: Best for swing trading
Higher timeframes produce more reliable zones
Trading Strategy Tips:
Wait for price to return to OB/FVG zones before entry
Combine with other confirmation signals (candlestick patterns, volume)
Higher timeframe OBs/FVGs carry more weight
Use as confluence with support/resistance levels
Filter Settings:
Lower timeframes: Increase minimum size filters to reduce noise
Higher timeframes: Can use smaller minimum size settings
Adjust based on asset volatility (crypto vs. forex vs. stocks)
⚠️ IMPORTANT NOTES
This indicator identifies potential zones but does not guarantee reversals
Always use proper risk management and stop losses
Combine with price action analysis for best results
Not all OBs/FVGs will result in reactions
Past performance does not guarantee future results
🎯 IDEAL FOR:
Smart Money Concepts (SMC) traders
ICT (Inner Circle Trader) methodology followers
Swing traders and day traders
Support/resistance zone identification
Confluence-based trading strategies
📝 SETTINGS OVERVIEW
FVG Settings:
Enable/disable FVG display
Bullish and bearish color selection
Extension length (bars)
Auto-delete filled gaps option
Minimum gap size filter (pips)
OB Settings:
Enable/disable OB display
Bullish and bearish color selection
Extension length (bars)
Show/hide labels
Minimum block size filter (pips)
✨ Clean, Simple, Effective
No complicated signals or cluttered displays - just clear visualization of the institutional footprints that matter most.
OB & FVG シンプル表示Here's a professional TradingView indicator description in English:
OB & FVG Indicator
SHORT DESCRIPTION
Clean and simple visualization of Order Blocks (OB) and Fair Value Gaps (FVG) with automatic detection and customizable display settings. Perfect for Smart Money Concepts (SMC) traders.
FULL DESCRIPTION
📊 OVERVIEW
This indicator automatically detects and displays two key Smart Money Concepts (SMC) elements on your chart:
Order Blocks (OB) - Institutional supply and demand zones
Fair Value Gaps (FVG) - Price imbalances that often get revisited
Designed for clarity and simplicity, this tool helps traders identify high-probability reversal zones and potential entry points based on institutional trading behavior.
🔧 KEY FEATURES
Order Blocks Detection:
Automatically identifies bullish OB (last bearish candle before upward move)
Automatically identifies bearish OB (last bullish candle before downward move)
Customizable colors for bullish/bearish zones
Optional labels for easy identification
Minimum size filter to eliminate noise
Fair Value Gaps Detection:
Detects bullish FVG (gap between candle high and previous candle low)
Detects bearish FVG (gap between candle low and previous candle high)
Color-coded zones for instant recognition
Auto-deletion of filled gaps (optional)
Minimum size filter in pips
Visual Customization:
Adjustable transparency levels
Custom color schemes for all elements
Configurable box extension length
Toggle labels on/off
Clean, non-cluttered chart display
Performance Optimization:
Automatic deletion of old boxes to maintain chart performance
Maximum 100 boxes stored at once
Lightweight code for fast rendering
⚙️ HOW TO USE
1. Installation
Click "Add to Chart"
The indicator will appear on your chart overlay
2. Configuration
Open Settings panel (gear icon)
Customize colors, transparency, and filters under respective groups
Adjust minimum size filters to match your trading style and timeframe
3. Interpretation
Order Blocks:
Blue zones = Bullish OB (potential support/demand)
Orange zones = Bearish OB (potential resistance/supply)
Price often reacts strongly when revisiting these zones
Fair Value Gaps:
Green zones = Bullish FVG (potential retracement target in uptrends)
Red zones = Bearish FVG (potential retracement target in downtrends)
Gaps are often "filled" before continuation moves
📈 BEST PRACTICES
Timeframe Recommendations:
15m - 1H charts: Best for intraday trading
4H - Daily charts: Best for swing trading
Higher timeframes produce more reliable zones
Trading Strategy Tips:
Wait for price to return to OB/FVG zones before entry
Combine with other confirmation signals (candlestick patterns, volume)
Higher timeframe OBs/FVGs carry more weight
Use as confluence with support/resistance levels
Filter Settings:
Lower timeframes: Increase minimum size filters to reduce noise
Higher timeframes: Can use smaller minimum size settings
Adjust based on asset volatility (crypto vs. forex vs. stocks)
⚠️ IMPORTANT NOTES
This indicator identifies potential zones but does not guarantee reversals
Always use proper risk management and stop losses
Combine with price action analysis for best results
Not all OBs/FVGs will result in reactions
Past performance does not guarantee future results
📝 SETTINGS OVERVIEW
FVG Settings:
Enable/disable FVG display
Bullish and bearish color selection
Extension length (bars)
Auto-delete filled gaps option
Minimum gap size filter (pips)
OB Settings:
Enable/disable OB display
Bullish and bearish color selection
Extension length (bars)
Show/hide labels
Minimum block size filter (pips)
✨ Clean, Simple, Effective
No complicated signals or cluttered displays - just clear visualization of the institutional footprints that matter most.
ZigZagZigZag Indicator – Overview
This ZigZag indicator highlights the most important swing highs and swing lows on the chart, helping traders see market structure more clearly by filtering out minor price movements. It connects significant turning points with straight lines, creating a clean visual representation of trend direction and major reversals.
How It Works
Price constantly moves up and down, but not every movement is meaningful. The ZigZag indicator waits for price to make a move large enough to be considered a true swing point. Once such a movement occurs, the indicator identifies it as either a swing high or a swing low and draws a line connecting it to the previous swing.
This produces a simplified outline of market structure, making it easier to recognize trends, corrections, and major turning points.
Settings
ZigZag Length
Controls the sensitivity of the indicator.
Lower values produce more frequent swing points.
Higher values show only major swings and reduce noise.
Show ZigZag
Enables or disables the visual lines. When disabled, the indicator continues tracking swing points internally.
What You See on the Chart
Every time the market creates a confirmed swing high or swing low, the indicator draws a line to the previous swing in the opposite direction.
After a major low is confirmed, a line is drawn to the most recent high.
After a major high is confirmed, a line is drawn to the most recent low.
This creates a clear, continuous zigzag that outlines the dominant movements of the market without reacting to every small fluctuation.
Why This ZigZag Is Useful
It does not repaint once a swing is confirmed.
It provides a clean and simplified view of price structure.
It helps identify trend direction, structure breaks, impulses, and corrections.
It is useful for traders who follow price action, smart money concepts, and swing-based strategies.
Recommended Use Cases
This ZigZag indicator is suited for traders who rely on market structure analysis, including:
Swing trading
Smart Money Concepts (BOS/CHOCH detection)
Identifying impulses and pullbacks
Finding strong highs and lows
Studying overall trend direction
Kim Lisa – Accurate PDH/PDL + PWH/PWL + Weekend Gap (EST)This indicator provides highly accurate market structure reference levels using official New York (EST) session data. It is designed for traders who rely on precise daily and weekly highs/lows as well as the weekly opening gap between Friday’s close and Monday’s open.
✔ Accurate Daily & Weekly Levels (EST)
The indicator fetches all levels directly from the D and W timeframes using request.security().
This ensures the levels are always correct, regardless of:
your broker
your chart’s timezone
your instrument
or your platform settings
You will always see the true official market structure:
PDH – Previous Day High
PDL – Previous Day Low
PWH – Previous Week High
PWL – Previous Week Low
These levels are essential for liquidity targeting, reversals, sweeps, and intraday trading.
✔ Clean Visual Lines + Labels
Each level is displayed as a clean, thin line on the chart with a small label for quick identification:
PDH (red)
PDL (green)
PWH (purple)
PWL (light purple)
The labels automatically update and move with the chart.
✔ New Week Opening Gap (Friday Close → Monday Open)
The indicator also identifies and highlights the Weekend Opening Gap, which forms between:
Friday’s official NY close (17:00 EST)
Monday’s official NY open
If a gap exists, the indicator draws a shaded box across the chart and labels it:
“NEW WEEK OPENING GAP”
This makes it easy to spot imbalances that often act as magnets for price during the new trading week.
✔ Works on ALL Timeframes
Intraday (1m–15m), swing trading, and even higher timeframes.
The levels always come from the correct higher timeframe data.
⭐ Ideal For:
Smart Money Concepts (SMC)
ICT trading
Liquidity strategies
Reversal traders
Scalpers
Gap traders
Market structure analysis
Opening week setups
💡 Why This Indicator Is Better
Most PDH/PDL indicators recalc levels from the local chart timezone, which leads to incorrect values.
This one pulls official NY session data, giving you:
✔ Consistency
✔ Accuracy
✔ Institutional-grade levels
✔ Perfect alignment with professional trading models
Supply & Demand ZonesThis indicator detects high-probability supply and demand zones using a multi-step smart money concept approach:
Liquidity Sweep Detection: Identifies when price sweeps above a pivot high (supply setup) or below a pivot low (demand setup), capturing liquidity grabs by institutional traders.
Displacement Confirmation: Requires a strong displacement candle (measured by ATR and body percentage) or fair value gap (FVG/imbalance) in the opposite direction after the sweep.
Volume Confirmation: Optional filter ensures zones form only when volume exceeds the user-defined threshold, indicating institutional participation.
Smart Filtering: Built-in logic prevents overlapping zones, enforces minimum spacing between signals, and requires confirmation bars to eliminate false signals.
Zone Lifecycle Management: Zones are automatically removed when price closes through them with momentum. Breached zones can optionally "flip" to the opposite type when re-tested with strong displacement.
✨ Key Features
Clean Visual Display: Small "D" (Demand) and "S" (Supply) labels with shaded zone boxes
Non-Repainting: All signals use confirmed historical data—no lookahead or repainting
Volume Filter: Optional confirmation using volume spike detection
Zone Flip Logic: Breached demand zones can become supply (and vice versa) when violated
Overlap Prevention: Smart algorithm prevents clustered or duplicate zones
Confirmation Delay: Configurable wait period after sweep to confirm genuine setups
Customizable Inputs: Adjust pivot sensitivity, displacement thresholds, volume filters, and more
Alert Ready: Built-in alert conditions for new supply and demand zone formations
🎯 How to Add to Your Chart
Favorite the Indicator: Click the star icon to add this script to your favorites
Open Your Chart: Navigate to the asset and timeframe you want to trade (works best on 5m-1H intraday charts)
Add Indicator: Click "Indicators" at the top, search for "Supply & Demand Zones (Smart Filtered)", and add to chart
Customize Settings: Click the gear icon ⚙️ to adjust inputs based on your trading style and instrument volatility
Set Alerts: Right-click the indicator name → "Add alert" → Select "Supply Zone" or "Demand Zone" conditions
📖 How to Use
Demand Zones (Green "D" Labels):
Price swept below a swing low (liquidity grab)
Strong bullish displacement or imbalance followed
Trading Action: Look for LONG entries when price returns to the zone or on immediate continuation
Stop Loss: Place just below the zone or sweep low
Target: Next resistance level, supply zone, or risk-reward ratio target
Supply Zones (Red "S" Labels):
Price swept above a swing high (liquidity grab)
Strong bearish displacement or imbalance followed
Trading Action: Look for SHORT entries when price returns to the zone or on immediate continuation
Stop Loss: Place just above the zone or sweep high
Target: Next support level, demand zone, or risk-reward ratio target
Flipped Zones (Orange Labels):
Previous demand/supply zone was broken with strong momentum
Zone has flipped polarity and may now act as the opposite type
Trading Action: Exercise caution—wait for additional confirmation before trading flipped zones
🔍 What to Look For
High-Quality Setups:
Zone forms with above-average volume (check volume filter is enabled)
Clear liquidity sweep visible on the chart
Strong displacement candle with large body percentage
Zone aligns with overall market trend or key structure levels
Multiple timeframe confirmation (check higher timeframe for context)
Avoid These Setups:
Zones forming in choppy, low-volume conditions
Multiple overlapping zones in the same area (indicator filters these automatically)
Zones that appear immediately after news events (set confirmation bars higher)
Counter-trend zones without additional confluence
⚙️ Recommended Settings by Timeframe
5-Minute Charts (Scalping):
Pivot Lookback: 3/3
Min Displacement ATR: 0.9
Confirmation Bars: 1
Min Zone Spacing: 3-5 bars
Volume Threshold: 1.2x
15-Minute Charts (Intraday):
Pivot Lookback: 4/4 (default)
Min Displacement ATR: 1.0 (default)
Confirmation Bars: 2 (default)
Min Zone Spacing: 5-8 bars
Volume Threshold: 1.2x
1-Hour Charts (Swing Trading):
Pivot Lookback: 5/5
Min Displacement ATR: 1.2-1.5
Confirmation Bars: 3
Min Zone Spacing: 8-12 bars
Volume Threshold: 1.3x
💡 Trading Tips & Best Practices
Combine with Price Action: Use this indicator alongside candlestick patterns, support/resistance, and trendlines for confirmation
Multiple Timeframe Analysis: Check higher timeframes for overall bias and major zones
Volume is Key: Enable volume filter to focus on institutional-backed moves
Risk Management: Always use stop losses and proper position sizing
Backtesting: Test settings on your preferred instruments and timeframes before live trading
Context Matters: Consider market conditions, news events, and session times
Wait for Confirmation: Don't rush entries—wait for price reaction at the zone
⚠️ Important Disclaimers
Educational Purpose Only: This indicator is provided for educational and informational purposes. It does not constitute financial advice, investment recommendations, or trading signals.
No Guarantees: Past performance and backtested results do not guarantee future results. Trading involves substantial risk of loss.
ATR Trend + RSI Pullback Strategy [Profit-Focused]This strategy is designed to catch high-probability pullbacks during strong trends using a combination of ATR-based volatility filters, RSI exhaustion levels, and a trend-following entry model.
Strategy Logic
Rather than relying on lagging crossovers, this model waits for RSI to dip into oversold zones (below 40) while price remains above a long-term EMA (default: 200). This setup captures pullbacks in strong uptrends, allowing traders to enter early in a move while controlling risk dynamically.
To avoid entries during low-volatility conditions or sideways price action, it applies a minimum ATR filter. The ATR also defines both the stop-loss and take-profit levels, allowing the model to adapt to changing market conditions.
Exit logic includes:
A take-profit at 3× the ATR distance
A stop-loss at 1.5× the ATR distance
An optional early exit if RSI crosses above 70, signaling overbought conditions
Technical Details
Trend Filter: 200 EMA – must be rising and price must be above it
Entry Signal: RSI dips below 40 during an uptrend
Volatility Filter: ATR must be above a user-defined minimum threshold
Stop-Loss: 1.5× ATR below entry price
Take-Profit: 3.0× ATR above entry price
Exit on Overbought: RSI > 70 (optional early exit)
Backtest Settings
Initial Capital: $10,000
Position Sizing: 5% of equity per trade
Slippage: 1 tick
Commission: 0.075% per trade
Trade Direction: Long only
Timeframes Tested: 15m, 1H, and 30m on trending assets like BTCUSD, NAS100, ETHUSD
This model is tuned for positive P&L across trending environments and volatile markets.
Educational Use Only
This strategy is for educational purposes only and should not be considered financial advice. Past performance does not guarantee future results. Always validate performance on multiple markets and timeframes before using it in live trading.
MTF Supertrend by Rakesh Sharma📊 MULTI-TIMEFRAME SUPERTREND INDICATOR
Get clear buy and sell signals from the powerful Supertrend indicator across three critical timeframes - all on one chart!
🎯 WHAT IT DOES:
This indicator analyzes the Supertrend across Monthly, Weekly, and Daily timeframes simultaneously, giving you a complete picture of market trends from short-term to long-term perspectives.
✨ KEY FEATURES:
- 📍 Visual Signal Labels: Clear buy/sell labels appear directly on your chart when Supertrend changes direction
- Daily signals (D-BUY/D-SELL) - Small green/red labels
- Weekly signals (W-BUY/W-SELL) - Medium blue/orange labels
- Monthly signals (M-BUY/M-SELL) - Large lime/maroon labels
- 📋 Live Summary Table: Real-time dashboard showing:
- Current trend direction for each timeframe (Bullish ▲ or Bearish ▼)
- Supertrend price levels
- Color-coded for quick reading
- 🎨 Visual Trend Confirmation:
- Supertrend line plotted on current timeframe
- Background color indicating current trend
- ⚙️ Fully Customizable:
- Adjustable ATR Period (default: 10)
- Adjustable Factor (default: 3.0)
- Toggle any timeframe on/off
- Show/hide summary table
🚀 HOW TO USE:
1. **Best Trades**: Look for alignment across multiple timeframes
- All 3 timeframes bullish = Strong buy opportunity
- All 3 timeframes bearish = Strong sell opportunity
2. **Signal Strength**:
- Monthly signals = Strongest, least frequent (major trend changes)
- Weekly signals = Medium strength, moderate frequency
- Daily signals = Most frequent, good for entries/exits
3. **Risk Management**:
- Use Supertrend levels as stop-loss points
- Higher timeframe trends act as confirmation for lower timeframe trades
4. **Settings Optimization**:
- Lower ATR period (7-8) = More sensitive, more signals
- Higher ATR period (12-14) = Less sensitive, fewer false signals
- Lower Factor (2.0-2.5) = Tighter stops, more signals
- Higher Factor (3.5-4.0) = Wider stops, fewer signals
💡 TRADING STRATEGY EXAMPLES:
**Conservative Approach:**
- Only take trades when all 3 timeframes align
- Use monthly trend as overall direction filter
- Enter on daily signals in direction of weekly/monthly trend
**Aggressive Approach:**
- Trade daily signals independently
- Use weekly/monthly as confirmation
- Quick entries and exits
**Swing Trading:**
- Focus on weekly signals
- Use monthly for trend direction
- Use daily for precise entry timing
⚠️ IMPORTANT NOTES:
- This is a trend-following indicator - works best in trending markets
- May generate whipsaws in choppy/sideways markets
- Always use proper risk management and position sizing
- Combine with volume analysis and support/resistance for best results
- Past performance does not guarantee future results
📈 BEST MARKETS:
Works on all markets: Stocks, Forex, Crypto, Commodities, Indices
⏰ BEST TIMEFRAMES:
Can be applied to any chart timeframe, but works best on:
- 1H to 4H charts for intraday trading
- Daily charts for swing trading
- Weekly charts for position trading
🔧 DEFAULT SETTINGS:
- ATR Period: 10
- Factor: 3.0
- All timeframes enabled
- Summary table visible
Feel free to adjust settings based on your trading style and the asset's volatility!
📚 ABOUT SUPERTREND:
Supertrend is a trend-following indicator that uses ATR (Average True Range) to plot dynamic support and resistance levels. It helps identify the current trend direction and potential reversal points.
---
💬 Questions or suggestions? Leave a comment below!
⭐ If you find this indicator helpful, please give it a boost!
Happy Trading! 🎯
NormalizedIndicatorsNormalizedIndicators Library - Comprehensive Trend Normalization & Pre-Calibrated Systems
Overview
The NormalizedIndicators Library is an advanced Pine Script™ collection that provides normalized trend-following indicators, calculation functions, and pre-calibrated consensus systems for technical analysis. This library extends beyond simple indicator normalization by offering battle-tested, optimized parameter sets for specific assets and timeframes.
The main advantage lies in its dual functionality:
Individual normalized indicators with standardized outputs (1 = bullish, -1 = bearish, 0 = neutral)
Pre-calibrated consensus functions that combine multiple indicators with asset-specific optimizations
This enables traders to either build custom strategies using individual indicators or leverage pre-optimized systems designed for specific markets.
📊 Library Structure
The library is organized into three main sections:
1. Trend-Following Indicators
Individual indicators normalized to standard output format
2. Calculation Indicators
Statistical and mathematical analysis functions
3. Pre-Calibrated Systems ⭐ NEW
Asset-specific consensus configurations with optimized parameters
🔄 Trend-Following Indicators
Stationary Indicators
These oscillate around a fixed value and are not bound to price.
TSI() - True Strength Index ⭐ NEW
Source: TradingView
Parameters:
price: Price source
long: Long smoothing period
short: Short smoothing period
signal: Signal line period
Logic: Double-smoothed momentum oscillator comparing TSI to its signal line
Signal:
1 (bullish): TSI ≥ TSI EMA
0 (bearish): TSI < TSI EMA
Use Case: Momentum confirmation with trend direction
SMI() - Stochastic Momentum Index ⭐ NEW
Source: TradingView
Parameters:
src: Price source
lengthK: Stochastic period
lengthD: Smoothing period
lengthEMA: Signal line period
Logic: Enhanced stochastic that measures price position relative to midpoint of high/low range
Signal:
1 (bullish): SMI ≥ SMI EMA
0 (bearish): SMI < SMI EMA
Use Case: Overbought/oversold with momentum direction
BBPct() - Bollinger Bands Percent
Source: Algoalpha X Sushiboi77
Parameters:
Length: Period for Bollinger Bands
Factor: Standard deviation multiplier
Source: Price source (typical: close)
Logic: Calculates the position of price within the Bollinger Bands as a percentage
Signal:
1 (bullish): when positionBetweenBands > 50
-1 (bearish): when positionBetweenBands ≤ 50
Special Feature: Uses an array to store historical standard deviations for additional analysis
RSI() - Relative Strength Index
Source: TradingView
Parameters:
len: RSI period
src: Price source
smaLen: Smoothing period for RSI
Logic: Classic RSI with additional SMA smoothing
Signal:
1 (bullish): RSI-SMA > 50
-1 (bearish): RSI-SMA < 50
0 (neutral): RSI-SMA = 50
Non-Stationary Indicators
These follow price movement and have no fixed boundaries.
NorosTrendRibbonSMA() & NorosTrendRibbonEMA()
Source: ROBO_Trading
Parameters:
Length: Moving average and channel period
Source: Price source
Logic: Creates a price channel based on the highest/lowest MA value over a specified period
Signal:
1 (bullish): Price breaks above upper band
-1 (bearish): Price breaks below lower band
0 (neutral): Price within channel (maintains last state)
Difference: SMA version uses simple moving averages, EMA version uses exponential
TrendBands()
Source: starlord_xrp
Parameters: src (price source)
Logic: Uses 12 EMAs (9-30 period) and checks if all are rising or falling simultaneously
Signal:
1 (bullish): All 12 EMAs are rising
-1 (bearish): All 12 EMAs are falling
0 (neutral): Mixed signals
Special Feature: Very strict conditions - extremely strong trend filter
Vidya() - Variable Index Dynamic Average
Source: loxx
Parameters:
source: Price source
length: Main period
histLength: Historical period for volatility calculation
Logic: Adaptive moving average that adjusts to volatility
Signal:
1 (bullish): VIDYA is rising
-1 (bearish): VIDYA is falling
VZO() - Volume Zone Oscillator
Parameters:
source: Price source
length: Smoothing period
volumesource: Volume data source
Logic: Combines price and volume direction, calculates the ratio of directional volume to total volume
Signal:
1 (bullish): VZO > 14.9
-1 (bearish): VZO < -14.9
0 (neutral): VZO between -14.9 and 14.9
TrendContinuation()
Source: AlgoAlpha
Parameters:
malen: First HMA period
malen1: Second HMA period
theclose: Price source
Logic: Uses two Hull Moving Averages for trend assessment with neutrality detection
Signal:
1 (bullish): Uptrend without divergence
-1 (bearish): Downtrend without divergence
0 (neutral): Trend and longer MA diverge
LeonidasTrendFollowingSystem()
Source: LeonidasCrypto
Parameters:
src: Price source
shortlen: Short EMA period
keylen: Long EMA period
Logic: Simple dual EMA crossover system
Signal:
1 (bullish): Short EMA < Key EMA
-1 (bearish): Short EMA ≥ Key EMA
ysanturtrendfollower()
Source: ysantur
Parameters:
src: Price source
depth: Depth of Fibonacci weighting
smooth: Smoothing period
bias: Percentage bias adjustment
Logic: Complex system with Fibonacci-weighted moving averages and bias bands
Signal:
1 (bullish): Weighted MA > smoothed MA (with upward bias)
-1 (bearish): Weighted MA < smoothed MA (with downward bias)
0 (neutral): Within bias zone
TRAMA() - Trend Regularity Adaptive Moving Average
Source: LuxAlgo
Parameters:
src: Price source
length: Adaptation period
Logic: Adapts to trend regularity - accelerates in stable trends, slows in consolidations
Signal:
1 (bullish): Price > TRAMA
-1 (bearish): Price < TRAMA
0 (neutral): Price = TRAMA
HullSuite()
Source: InSilico
Parameters:
_length: Base period
src: Price source
_lengthMult: Length multiplier
Logic: Uses Hull Moving Average with lagged comparisons for trend determination
Signal:
1 (bullish): Current Hull > Hull 2 bars ago
-1 (bearish): Current Hull < Hull 2 bars ago
0 (neutral): No change
STC() - Schaff Trend Cycle
Source: shayankm (described as "Better MACD")
Parameters:
length: Cycle period
fastLength: Fast MACD period
slowLength: Slow MACD period
src: Price source
Logic: Combines MACD concepts with stochastic normalization for early trend signals
Signal:
1 (bullish): STC is rising
-1 (bearish): STC is falling
🧮 Calculation Indicators
These functions provide specialized mathematical calculations for advanced analysis.
LCorrelation() - Long-term Correlation
Creator: unicorpusstocks
Parameters:
Input: First time series
Compare: Second time series
Logic: Calculates the average of correlations across 6 different periods (30, 60, 90, 120, 150, 180)
Returns: Correlation value between -1 and 1
Application: Long-term relationship analysis between assets, markets, or indicators
MCorrelation() - Medium-term Correlation
Creator: unicorpusstocks
Parameters:
Input: First time series
Compare: Second time series
Logic: Calculates the average of correlations across 6 different periods (15, 30, 45, 60, 75, 90)
Returns: Correlation value between -1 and 1
Application: Medium-term relationship analysis with higher sensitivity
assetBeta() - Beta Coefficient
Creator: unicorpusstocks
Parameters:
measuredSymbol: The asset to be measured
baseSymbol: The reference asset (e.g., market index)
Logic:
Calculates Beta across 4 different time horizons (50, 100, 150, 200 periods)
Beta = Correlation × (Asset Standard Deviation / Market Standard Deviation)
Returns the average of all 4 Beta values
Returns: Beta value (typically 0-2, can be higher/lower)
Interpretation:
Beta = 1: Asset moves in sync with the market
Beta > 1: Asset more volatile than market
Beta < 1: Asset less volatile than market
Beta < 0: Asset moves inversely to the market
🎯 Pre-Calibrated Systems ⭐ NEW FEATURE
These are ready-to-use consensus functions with optimized parameters for specific assets and timeframes. Each calibration has been fine-tuned through extensive backtesting to provide optimal performance for its target market.
Universal Calibrations
virtual_4d_cal(src) - Virtual/General 4-Day Timeframe
Use Case: General purpose 4-day chart analysis
Optimized For: Broad crypto market on 4D timeframe
Indicators Used: BBPct, Noro's, RSI, VIDYA, HullSuite, TrendContinuation, Leonidas, TRAMA
Characteristics: Balanced sensitivity for swing trading
virtual_1d_cal(src) - Virtual/General 1-Day Timeframe
Use Case: General purpose daily chart analysis
Optimized For: Broad crypto market on 1D timeframe
Indicators Used: BBPct, Noro's, RSI, VIDYA, HullSuite, TrendContinuation, Leonidas, TRAMA
Characteristics: Standard daily trading parameters
Cryptocurrency Specific
sui_cal(src) - SUI Ecosystem Tokens
Use Case: Tokens in the SUI blockchain ecosystem
Timeframe: 1D
Characteristics: Fast-response parameters for high volatility projects
deep_1d_cal(src) - DEEP Token Daily
Use Case: Deepbook (DEEP) token analysis
Timeframe: 1D
Characteristics: Tuned for liquidity protocol token behavior
wal_1d_cal(src) - WAL Token Daily
Use Case: Specific for WAL token
Timeframe: 1D
Characteristics: Mid-range sensitivity parameters
sns_1d_cal(src) - SNS Token Daily
Use Case: Specific for SNS token
Timeframe: 1D
Characteristics: Balanced parameters for DeFi tokens
meme_cal(src) - Meme Coin Calibration
Use Case: Highly volatile meme coins
Timeframe: Various
Characteristics: Wider parameters to handle extreme volatility
Warning: Meme coins carry extreme risk
base_cal(src) - BASE Ecosystem Tokens
Use Case: Tokens on the BASE blockchain
Timeframe: Various
Characteristics: Optimized for L2 ecosystem tokens
Solana Ecosystem
sol_4d_cal(src) - Solana 4-Day
Use Case: SOL token on 4-day charts
Characteristics: Responsive parameters for major L1 blockchain
sol_meme_4d_cal(src) - Solana Meme Coins 4-Day
Use Case: Meme coins on Solana blockchain
Timeframe: 4D
Characteristics: Handles high volatility of Solana meme sector
Ethereum Ecosystem
eth_4d_cal(src) - Ethereum 4-Day
Use Case: ETH and major ERC-20 tokens
Timeframe: 4D
Indicators Used: BBPct, Noro's, RSI, TSI, HullSuite, TrendContinuation, Leonidas, SMI
Special: Uses TSI and SMI instead of VIDYA and TRAMA
Characteristics: Tuned for Ethereum's market cycles
Bitcoin
btc_4d_cal(src) - Bitcoin 4-Day
Use Case: Bitcoin on 4-day charts
Timeframe: 4D
Characteristics: Slower, smoother parameters for the most established crypto asset
Notes: Conservative parameters suitable for position trading
Traditional Markets
qqq_4d_cal(src) - QQQ (Nasdaq-100 ETF) 4-Day
Use Case: QQQ ETF and tech-heavy indices
Timeframe: 4D
Characteristics: Largest parameter sets reflecting lower volatility of traditional markets
Notes: Can be adapted for similar large-cap tech indices
💡 Usage Examples
Example 1: Using Pre-Calibrated System
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
// Simple one-line implementation for Bitcoin
btcSignal = lib.btc_4d_cal(close)
// Trading logic
longCondition = btcSignal > 0.5
shortCondition = btcSignal < -0.5
// Plot
plot(btcSignal, "BTC 4D Consensus", color.orange)
Example 2: Custom Multi-Indicator Consensus
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
// Build your own combination
signal1 = lib.BBPct(20, 2.0, close)
signal2 = lib.RSI(14, close, 5)
signal3 = lib.TRAMA(close, 50)
signal4 = lib.TSI(close, 25, 13, 13)
// Custom consensus
customConsensus = math.avg(signal1, signal2, signal3, signal4)
plot(customConsensus, "Custom Consensus", color.blue)
Example 3: Asset-Specific Strategy Switching
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
// Automatically use the right calibration
signal = switch syminfo.ticker
"BTCUSD" => lib.btc_4d_cal(close)
"ETHUSD" => lib.eth_4d_cal(close)
"SOLUSD" => lib.sol_4d_cal(close)
"QQQ" => lib.qqq_4d_cal(close)
=> lib.virtual_4d_cal(close) // Default
plot(signal, "Auto-Calibrated Signal", color.orange)
Example 4: Correlation-Filtered Trading
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
// Only trade when strong correlation with market exists
spy = request.security("SPY", timeframe.period, close)
correlation = lib.MCorrelation(close, spy)
trendSignal = lib.virtual_1d_cal(close)
// Only signals with positive market correlation
tradeBuy = trendSignal > 0.5 and correlation > 0.5
tradeSell = trendSignal < -0.5 and correlation > 0.5
Example 5: Beta-Adjusted Position Sizing
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
spy = request.security("SPY", timeframe.period, close)
beta = lib.assetBeta(close, spy)
// Adjust position size based on Beta
basePositionSize = 100
adjustedSize = basePositionSize / beta // Less size with high Beta
// Use with calibrated signal
signal = lib.qqq_4d_cal(close)
🎯 Choosing the Right Calibration
Decision Tree
1. What asset are you trading?
Bitcoin → btc_4d_cal()
Ethereum/ERC-20 → eth_4d_cal()
Solana → sol_4d_cal()
Solana memes → sol_meme_4d_cal()
SUI ecosystem → sui_cal()
BASE ecosystem → base_cal()
Meme coins (any chain) → meme_cal()
QQQ/Tech indices → qqq_4d_cal()
Other/General → virtual_4d_cal() or virtual_1d_cal()
2. What timeframe?
Most calibrations are optimized for 4D (4-day) or 1D (daily)
For other timeframes, start with virtual calibrations and adjust
3. What's the asset's volatility?
High volatility (memes, new tokens) → Use meme_cal() or similar
Medium volatility (established alts) → Use specific calibrations
Low volatility (BTC, major indices) → Use btc_4d_cal() or qqq_4d_cal()
⚙️ Technical Details
Normalization Standard
Bullish: 1
Bearish: -1
Neutral: 0 (only for selected indicators)
Calibration Methodology
Pre-calibrated functions were optimized using:
Historical backtesting on target assets
Parameter optimization for maximum Sharpe ratio
Validation on out-of-sample data
Real-time forward testing
Iterative refinement based on market conditions
Advantages of Pre-Calibrations
Instant Deployment: No parameter tuning needed
Asset-Optimized: Tailored to specific market characteristics
Tested Performance: Validated through extensive backtesting
Consistent Framework: All use the same 8-indicator structure
Easy Comparison: Compare different assets using same methodology
Performance Considerations
All functions are optimized for Pine Script v5
Proper use of var for state management
Efficient array operations where needed
Minimal recursive calls
Pre-calibrations add negligible computational overhead
📋 License
This code is subject to the Mozilla Public License 2.0 at mozilla.org
🔧 Installation
pinescriptimport unicorpusstocks/NormalizedIndicators/1
Then use functions with your chosen alias:
pinescript// Individual indicators
lib.BBPct(20, 2.0, close)
lib.RSI(14, close, 5)
lib.TSI(close, 25, 13, 13)
// Pre-calibrated systems
lib.btc_4d_cal(close)
lib.eth_4d_cal(close)
lib.meme_cal(close)
⚠️ Important Notes
General Usage
All indicators are lagging, as is typical for trend-following indicators
Signals should be combined with additional analysis (volume, support/resistance, etc.)
Backtesting is recommended before starting live trading with these signals
Different assets and timeframes may require different parameter optimizations
Pre-Calibrated Systems
Calibrations are optimized for specific timeframes - using them on different timeframes may reduce effectiveness
Market conditions change - what worked historically may need adjustment
Pre-calibrations are starting points, not guaranteed solutions
Always validate performance on your specific use case
Consider current market regime (trending vs. ranging)
Risk Management
Meme coin calibrations are designed for extremely volatile assets - use appropriate position sizing
Pre-calibrated systems do not eliminate risk
Always use stop losses and proper risk management
Past performance does not guarantee future results
Customization
Pre-calibrations can serve as templates for your own optimizations
Feel free to adjust individual parameters within calibration functions
Test modifications thoroughly before live deployment
🎓 Advanced Use Cases
Multi-Asset Portfolio Dashboard
Create a dashboard showing consensus across different assets:
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
btc = request.security("BTCUSD", "4D", close)
eth = request.security("ETHUSD", "4D", close)
sol = request.security("SOLUSD", "4D", close)
btcSignal = lib.btc_4d_cal(btc)
ethSignal = lib.eth_4d_cal(eth)
solSignal = lib.sol_4d_cal(sol)
// Plot all three for comparison
plot(btcSignal, "BTC", color.orange)
plot(ethSignal, "ETH", color.blue)
plot(solSignal, "SOL", color.purple)
Regime Detection
Use correlation and calibrations together:
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
// Detect market regime
btc = request.security("BTCUSD", timeframe.period, close)
correlation = lib.MCorrelation(close, btc)
// Choose strategy based on correlation
signal = correlation > 0.7 ? lib.btc_4d_cal(close) : lib.virtual_4d_cal(close)
Comparative Analysis
Compare asset-specific vs. general calibrations:
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
specificSignal = lib.btc_4d_cal(close) // BTC-specific
generalSignal = lib.virtual_4d_cal(close) // General
divergence = specificSignal - generalSignal
plot(divergence, "Calibration Divergence", color.yellow)
🚀 Quick Start Guide
For Beginners
Identify Your Asset: What are you trading?
Find the Calibration: Use the decision tree above
One-Line Implementation: signal = lib.btc_4d_cal(close)
Set Thresholds: Buy when > 0.5, sell when < -0.5
Add Risk Management: Always use stops
For Advanced Users
Start with Pre-Calibration: Use as baseline
Analyze Performance: Backtest on your specific market
Fine-Tune Parameters: Adjust individual indicators if needed
Combine with Other Signals: Volume, market structure, etc.
Create Custom Calibrations: Build your own based on library structure
For Developers
Import Library: Access all functions
Mix and Match: Combine indicators creatively
Build Custom Logic: Use indicators as building blocks
Create New Calibrations: Follow the established pattern
Share and Iterate: Contribute to the trading community
🎯 Key Takeaways
✅ 10 normalized indicators - Consistent interpretation across all
✅ 16+ pre-calibrated systems - Ready-to-use for specific assets
✅ Asset-optimized parameters - No guesswork required
✅ Calculation functions - Advanced correlation and beta analysis
✅ Universal framework - Works across crypto, stocks, forex
✅ Professional-grade - Built on proven technical analysis principles
✅ Flexible architecture - Use pre-calibrations or build your own
✅ Battle-tested - Validated through extensive backtesting
NormalizedIndicators Library transforms complex multi-indicator analysis into actionable signals through both customizable individual indicators and pre-optimized consensus systems. Whether you're a beginner looking for plug-and-play solutions or an advanced trader building sophisticated strategies, this library provides the foundation for data-driven trading decisions.WiederholenClaude kann Fehler machen. Bitte überprüfen Sie die Antworten. Sonnet 4.5
indicator CalibrationIndicator Calibration - Multi-Indicator Consensus System
Overview
Indicator Calibration is a powerful consensus-based trading indicator that leverages the MyIndicatorLibrary (NormalizedIndicators) to combine multiple trend-following indicators into a single, actionable signal. By averaging the normalized outputs of up to 8 different trend indicators, this tool provides traders with a clear consensus view of market direction, reducing noise and false signals inherent in single-indicator approaches.
The indicator outputs a value between -1 (strong bearish) and +1 (strong bullish), with 0 representing a neutral market state. This creates an intuitive, easy-to-read oscillator that synthesizes multiple analytical perspectives into one coherent signal.
🎯 Core Concept
Consensus Trading Philosophy
Rather than relying on a single indicator that may give conflicting or premature signals, Indicator Calibration employs a democratic voting system where multiple indicators contribute their normalized opinion:
Each enabled indicator votes: +1 (bullish), -1 (bearish), or 0 (neutral)
The votes are averaged to create a consensus signal
Strong consensus (closer to ±1) indicates high agreement among indicators
Weak consensus (closer to 0) indicates market indecision or transition
Key Benefits
Reduced False Signals: Multiple indicators must agree before strong signals appear
Noise Filtering: Individual indicator quirks are smoothed out by averaging
Customizable: Enable/disable indicators and adjust parameters to suit your trading style
Universal Application: Works across all timeframes and asset classes
Clear Visualization: Simple line oscillator with clear bull/bear zones
📊 Included Indicators
The system can utilize up to 8 normalized trend-following indicators from the library:
1. BBPct - Bollinger Bands Percent
Parameters: Length (default: 20), Factor (default: 2)
Type: Stationary oscillator
Strength: Mean reversion and volatility detection
2. NorosTrendRibbonEMA
Parameters: Length (default: 20)
Type: Non-stationary trend follower
Strength: Breakout detection with momentum confirmation
3. RSI - Relative Strength Index
Parameters: Length (default: 9), SMA Length (default: 4)
Type: Stationary momentum oscillator
Strength: Overbought/oversold with smoothing
4. Vidya - Variable Index Dynamic Average
Parameters: Length (default: 30), History Length (default: 9)
Type: Adaptive moving average
Strength: Volatility-adjusted trend following
5. HullSuite
Parameters: Length (default: 55), Multiplier (default: 1)
Type: Fast-response moving average
Strength: Low-lag trend identification
6. TrendContinuation
Parameters: MA Length 1 (default: 50), MA Length 2 (default: 25)
Type: Dual HMA system
Strength: Trend quality assessment with neutral states
7. LeonidasTrendFollowingSystem
Parameters: Short Length (default: 21), Key Length (default: 10)
Type: Dual EMA crossover
Strength: Simple, reliable trend tracking
8. TRAMA - Trend Regularity Adaptive Moving Average
Parameters: Length (default: 50)
Type: Adaptive trend follower
Strength: Adjusts to trend stability
⚙️ Input Parameters
Source Settings
Source: Choose your price input (default: close)
Can be modified to: open, high, low, close, hl2, hlc3, ohlc4, hlcc4
Indicator Selection
Each indicator can be enabled or disabled via checkboxes:
use_bbpct: Enable/disable Bollinger Bands Percent
use_noros: Enable/disable Noro's Trend Ribbon
use_rsi: Enable/disable RSI
use_vidya: Enable/disable VIDYA
use_hull: Enable/disable Hull Suite
use_trendcon: Enable/disable Trend Continuation
use_leonidas: Enable/disable Leonidas System
use_trama: Enable/disable TRAMA
Parameter Customization
Each indicator has its own parameter group where you can fine-tune:
val 1: Primary period/length parameter
val 2: Secondary parameter (multiplier, smoothing, etc.)
📈 Signal Interpretation
Output Line (Orange)
The main output oscillates between -1 and +1:
+1.0 to +0.5: Strong bullish consensus (all or most indicators agree on uptrend)
+0.5 to +0.2: Moderate bullish bias (bullish indicators outnumber bearish)
+0.2 to -0.2: Neutral zone (mixed signals or transition phase)
-0.2 to -0.5: Moderate bearish bias (bearish indicators outnumber bullish)
-0.5 to -1.0: Strong bearish consensus (all or most indicators agree on downtrend)
Reference Lines
Green line (+1): Maximum bullish consensus
Red line (-1): Maximum bearish consensus
Gray line (0): Neutral midpoint
💡 Trading Strategies
Strategy 1: Consensus Threshold Trading
Entry Rules:
- Long: Output crosses above +0.5 (strong bullish consensus)
- Short: Output crosses below -0.5 (strong bearish consensus)
Exit Rules:
- Exit Long: Output crosses below 0 (consensus lost)
- Exit Short: Output crosses above 0 (consensus lost)
Strategy 2: Zero-Line Crossover
Entry Rules:
- Long: Output crosses above 0 (bullish shift in consensus)
- Short: Output crosses below 0 (bearish shift in consensus)
Exit Rules:
- Exit on opposite crossover
Strategy 3: Divergence Trading
Look for divergences between:
- Price making higher highs while indicator makes lower highs (bearish divergence)
- Price making lower lows while indicator makes higher lows (bullish divergence)
Strategy 4: Extreme Reading Reversal
Entry Rules:
- Long: Output reaches -0.8 or below (extreme bearish consensus = potential reversal)
- Short: Output reaches +0.8 or above (extreme bullish consensus = potential reversal)
Use with caution - best combined with other reversal signals
🔧 Optimization Tips
For Trending Markets
Enable trend-following indicators: Noro's, VIDYA, Hull Suite, Leonidas
Use higher threshold levels (±0.6) to filter out minor retracements
Increase indicator periods for smoother signals
For Range-Bound Markets
Enable oscillators: BBPct, RSI
Use zero-line crossovers for entries
Decrease indicator periods for faster response
For Volatile Markets
Enable adaptive indicators: VIDYA, TRAMA
Use wider threshold levels to avoid whipsaws
Consider disabling fast indicators that may overreact
Custom Calibration Process
Start with all indicators enabled using default parameters
Backtest on your chosen timeframe and asset
Identify which indicators produce the most false signals
Disable or adjust parameters for problematic indicators
Test different threshold levels for entry/exit
Validate on out-of-sample data
📊 Visual Guide
Color Scheme
Orange Line: Main consensus output
Green Horizontal: Bullish extreme (+1)
Red Horizontal: Bearish extreme (-1)
Gray Horizontal: Neutral zone (0)
Reading the Chart
Line above 0: Net bullish sentiment
Line below 0: Net bearish sentiment
Line near extremes: Strong consensus
Line fluctuating near 0: Indecision or transition
Smooth line movement: Stable consensus
Erratic line movement: Conflicting signals
⚠️ Important Considerations
Lag Characteristics
This is a lagging indicator by design (consensus takes time to form)
Best used for trend confirmation rather than early entry
May miss the first portion of strong moves
Reduces false entries at the cost of delayed entries
Number of Active Indicators
More indicators = smoother but slower signals
Fewer indicators = faster but potentially noisier signals
Minimum recommended: 4 indicators for reliable consensus
Optimal: 6-8 indicators for balanced performance
Market Conditions
Best: Strong trending markets (up or down)
Good: Volatile markets with clear directional moves
Poor: Choppy, sideways markets with no clear trend
Worst: Low-volume, range-bound conditions
Complementary Tools
Consider combining with:
Volume analysis for confirmation
Support/resistance levels for entry/exit points
Market structure analysis (higher timeframe trends)
Risk management tools (ATR-based stops)
🎓 Example Use Cases
Swing Trading
Timeframe: Daily or 4H
Enable: All 8 indicators with default parameters
Entry: Consensus > +0.5 or < -0.5
Hold: Until consensus reverses to opposite extreme
Day Trading
Timeframe: 15m or 1H
Enable: Faster indicators (RSI, BBPct, Noro's, Hull Suite)
Entry: Zero-line crossover with volume confirmation
Exit: Opposite crossover or profit target
Position Trading
Timeframe: Weekly or Daily
Enable: Slower indicators (TRAMA, VIDYA, Trend Continuation)
Entry: Strong consensus (±0.7) with higher timeframe confirmation
Hold: Months until consensus weakens significantly
🔬 Technical Details
Calculation Method
1. Each enabled indicator calculates its normalized signal (-1, 0, or +1)
2. All active signals are stored in an array
3. Array.avg() computes the arithmetic mean
4. Result is plotted as a continuous line
Output Range
Theoretical: -1.0 to +1.0
Practical: Typically ranges between -0.8 to +0.8
Rare: All indicators perfectly aligned at ±1.0
Performance
Lightweight calculation (simple averaging)
No repainting (all indicators are non-repainting)
Compatible with all Pine Script features
Works on all TradingView plans
📋 License
This code is subject to the Mozilla Public License 2.0 at mozilla.org
🚀 Quick Start Guide
Add to Chart: Apply indicator to your chart
Choose Timeframe: Select appropriate timeframe for your trading style
Enable Indicators: Start with all 8 enabled
Observe Behavior: Watch how consensus forms during different market conditions
Calibrate: Adjust parameters and indicator selection based on observations
Backtest: Validate your settings on historical data
Trade: Apply with proper risk management
🎯 Key Takeaways
✅ Consensus beats individual indicators - Multiple perspectives reduce errors
✅ Customizable to your style - Enable/disable and tune to preference
✅ Simple interpretation - One line tells the story
✅ Works across markets - Stocks, crypto, forex, commodities
✅ Reduces emotional trading - Clear, objective signal generation
✅ Professional-grade - Built on proven technical analysis principles
Indicator Calibration transforms complex multi-indicator analysis into a single, actionable signal. By harnessing the collective wisdom of multiple proven trend-following systems, traders gain a powerful edge in identifying high-probability trade setups while filtering out market noise.






















