OPEN-SOURCE SCRIPT
LRHA Trend Shift Detector

LRHA Trend Shift Detector (TSD)
The LRHA Trend Shift Detector is an advanced momentum exhaustion indicator that identifies potential trend reversals and changes by analyzing Linear Regression Heikin Ashi (LRHA) candle patterns. TSD focuses on detecting when strong directional moves begin to lose momentum.
🔬 Methodology
The indicator employs a three-stage detection process:
When an extended move shows clear signs of momentum exhaustion, the indicator signals a potential trend shift with red dots plotted above or below your candlesticks.
⚙️ Parameters
Core Settings
Trend Trading
🎛️ Optimization Tips
For More Signals (Aggressive)
- Decrease LRHA Length (7-9)
- Reduce Minimum Trend Bars (2-3)
- Lower Size Reduction Threshold (25-35%)
For Higher Quality (Conservative)
- Increase LRHA Length (13-18)
- Raise Minimum Trend Bars (5-6)
- Higher Size Reduction Threshold (45-55%)
⚠️ Important Notes⚠️
- **Not a Complete Strategy**: Use as confluence with other analysis methods
- **Market Context Matters**: Consider overall trend direction and key support/resistance levels
- **Risk Management Essential**: Always use proper position sizing and stop losses
- **Backtest First**: Optimize parameters for your specific trading style and instruments
The LRHA Trend Shift Detector is an advanced momentum exhaustion indicator that identifies potential trend reversals and changes by analyzing Linear Regression Heikin Ashi (LRHA) candle patterns. TSD focuses on detecting when strong directional moves begin to lose momentum.
🔬 Methodology
The indicator employs a three-stage detection process:
- LRHA Calculation: Applies linear regression smoothing to Heikin Ashi candles, creating ultra-smooth trend-following candles that filter out market noise
- Extended Move Detection: Identifies sustained directional moves by counting consecutive bullish or bearish LRHA candles
- Momentum Exhaustion Analysis: Monitors for significant changes in candle size compared to recent averages
When an extended move shows clear signs of momentum exhaustion, the indicator signals a potential trend shift with red dots plotted above or below your candlesticks.
⚙️ Parameters
Core Settings
- LRHA Length (11): Linear regression period for smoothing calculations. Lower values = more responsive, higher values = smoother trends.
- Minimum Trend Bars (4): Consecutive candles required to establish an "extended move." Higher number detects longer term trend changes.
- Exhaustion Bars (3): Number of consecutively smaller candles needed to signal exhaustion. Lower is more sensitive.
- Size Reduction Threshold (40%): Percentage decrease in candle size to qualify as "exhaustion." Lower is more sensitive.
Trend Trading
- Pullback Entries: Identify exhaustion in counter-trend moves for trend continuation
- Exit Strategy: Recognize when main trend momentum is fading
- Position Sizing: Reduce size when seeing exhaustion in your direction
🎛️ Optimization Tips
For More Signals (Aggressive)
- Decrease LRHA Length (7-9)
- Reduce Minimum Trend Bars (2-3)
- Lower Size Reduction Threshold (25-35%)
For Higher Quality (Conservative)
- Increase LRHA Length (13-18)
- Raise Minimum Trend Bars (5-6)
- Higher Size Reduction Threshold (45-55%)
⚠️ Important Notes⚠️
- **Not a Complete Strategy**: Use as confluence with other analysis methods
- **Market Context Matters**: Consider overall trend direction and key support/resistance levels
- **Risk Management Essential**: Always use proper position sizing and stop losses
- **Backtest First**: Optimize parameters for your specific trading style and instruments
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
discord.gg/REapC6SGtz
b3artrades@gmail.com
b3artrades@gmail.com
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
discord.gg/REapC6SGtz
b3artrades@gmail.com
b3artrades@gmail.com
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。