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
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
discord.gg/REapC6SGtz
b3artrades@gmail.com
b3artrades@gmail.com
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
discord.gg/REapC6SGtz
b3artrades@gmail.com
b3artrades@gmail.com
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.