Laguerre-Geometric Moving Average with Range Filter
This is the first Indicator I am uploading from my series of indicators, that I am using in my professional EAs.
Overview
The Laguerre-Geometric Moving Average indicator is an advanced technical analysis tool that combines three sophisticated mathematical approaches to provide enhanced trend detection and market analysis. This hybrid indicator integrates the Laguerre Filter, Geometric Moving Average (GMA), and intelligent range filtering to deliver a comprehensive view of market conditions while adapting to changing market dynamics.
Core Components
1. Laguerre Filter
The Laguerre Filter is a low-lag digital filter that provides superior smoothing characteristics compared to traditional moving averages. It processes price data through four cascaded stages (L0, L1, L2, L3) to reduce noise while maintaining responsiveness to genuine price movements.
2. Geometric Moving Average (GMA)
The GMA calculates the geometric mean of prices over a specified period, providing a more balanced representation of price action that is less sensitive to extreme values compared to arithmetic averages.
3. Range Filter
An innovative filtering mechanism that identifies neutral market conditions. When market conditions fall within a specified range, the indicator switches to a filtered state, helping traders avoid false signals during sideways market movements.
Adaptive Intelligence System
The indicator features a sophisticated adaptive system that automatically adjusts its parameters based on real-time market conditions:
- Volatility Detection: Monitors market volatility to adjust smoothing parameters
- Trend Strength Analysis: Evaluates trending versus ranging market conditions
- Dynamic Parameter Adjustment: Automatically modifies Laguerre gamma, GMA period, and hybrid ratios
Input Parameters
? Core Settings
Laguerre_Gamma (0.5 default)
- Range: 0.1 to 0.9
- Controls the smoothness of the Laguerre filter
- Lower values (0.1-0.3): More responsive, suitable for short-term trading
- Higher values (0.7-0.9): Smoother output, better for longer-term analysis
GMA_Period (20 default)
- Range: 2 to 500
- Defines the lookback period for Geometric Moving Average calculation
- Lower values (5-10): Fast response for scalping strategies
- Higher values (20-50): Smoother signals for swing trading
Hybrid_Ratio (0.5 default)
- Range: 0.1 to 0.9
- Controls the mixing ratio between Laguerre and GMA components
- Lower values (0.1-0.3): Emphasizes GMA component (trend-following bias)
- Higher values (0.7-0.9): Emphasizes Laguerre component (smoothing bias)
? Range Filter
RangeFilter (true default)
- Range: true/false
- Master switch to enable/disable range-based filtering
- When enabled, signals are filtered during neutral market conditions
? Adaptive Intelligence Controls
Adaptive_Mode (true default)
- Range: true/false
- Master switch for all adaptive features
- When disabled, uses fixed input parameters
Adaptive_Laguerre (true default)
- Range: true/false
- Enables automatic adjustment of Laguerre gamma based on market conditions
- Increases smoothing during choppy markets
- Increases responsiveness during trending markets
Adaptive_GMA (true default)
- Range: true/false
- Enables automatic adjustment of GMA period
- Extends period during high volatility
- Shortens period during strong trends
? Trend Detection System
Trend_Sensitivity (8 default)
- Range: 3 to 50
- Controls the patience of trend detection algorithm
- Lower values (3-5): Quick trend changes, more signals
- Higher values (15-20): Patient approach, fewer but more reliable signals
? Display & Debug Options
Show_Debug_Info (false default)
- Range: true/false
- Enables detailed adaptation information in the terminal
- Useful for optimization and understanding indicator behavior
- Displays volatility, trend strength, and parameter adjustments
Signal Interpretation
Color Coding
- Blue: Bullish trend detected
- Red: Bearish trend detected
- Gray: Range-filtered state (neutral market conditions)
Trading Applications
- Trend Following: Use blue/red signals for directional bias
- Range Trading: Gray signals indicate potential range-bound conditions
- Risk Management: Gray periods suggest reduced position sizing or avoidance
Trading Tips & Usage Strategies
? Basic Trading Strategies
Trend Following Strategy
- Enter long positions when the line turns blue
- Enter short positions when the line turns red
- Exit or reduce positions when the line turns gray
- Use higher timeframes (H4, Daily) for stronger signals
Range Trading Strategy
- Focus on gray periods for potential reversal setups
- Look for price bounces at support/resistance during gray signals
- Use lower timeframes (M15, M30) for entry refinement
- Avoid trending markets when using this approach
Confluence Trading
- Combine with other indicators (RSI, MACD, Bollinger Bands)
- Wait for multiple confirmations before entering trades
- Use price action patterns (pin bars, engulfing candles) for entries
⚙️ Parameter Optimization Tips
For Scalping (M1-M5 timeframes):
- Laguerre_Gamma: 0.3-0.4 (more responsive)
- GMA_Period: 8-12 (faster signals)
- Trend_Sensitivity: 3-5 (quick reactions)
- Enable all adaptive features
For Day Trading (M15-H1 timeframes):
- Laguerre_Gamma: 0.5-0.6 (balanced)
- GMA_Period: 20-25 (moderate smoothing)
- Trend_Sensitivity: 8-10 (standard patience)
- Keep default adaptive settings
For Swing Trading (H4-Daily timeframes):
- Laguerre_Gamma: 0.7-0.8 (smoother)
- GMA_Period: 30-40 (longer-term view)
- Trend_Sensitivity: 15-20 (patient signals)
- Consider disabling adaptive features for consistency
? Multi-Timeframe Analysis
Top-Down Approach:
- Check Daily chart for overall trend direction
- Use H4 for intermediate trend confirmation
- Enter on H1 or M15 when all timeframes align
- Gray signals on higher timeframes = caution on lower timeframes
Timeframe Hierarchy:
- Daily: Primary trend direction
- H4: Swing high/low identification
- H1: Entry timing and management
- M15: Precise entry points
?️ Risk Management Guidelines
Position Sizing:
- Full size during strong blue/red signals with trend confirmation
- Reduced size (50%) during trend transitions
- Minimal size (25%) or avoid during gray periods
- Never risk more than 2% per trade
Stop Loss Placement:
- Below/above recent swing points during trending phases
- Tighter stops during gray (filtered) periods
- Use ATR-based stops for volatility adjustment
- Move stops to breakeven after 1:1 reward-to-risk
Take Profit Strategies:
- Scale out at key resistance/support levels
- Use trailing stops during strong trends (blue/red)
- Take profits quickly during gray periods
- Target 2:1 or 3:1 reward-to-risk ratios
? Market Condition Recognition
Trending Markets (Blue/Red dominant):
- Hold positions longer
- Use wider stops
- Add to winning positions
- Focus on breakout strategies
Ranging Markets (Gray frequent):
- Take quick profits
- Use tighter stops
- Focus on mean reversion
- Avoid breakout trades
Transitional Markets (Color changes frequent):
- Reduce position sizes
- Increase monitoring frequency
- Focus on short-term trades
- Wait for clearer signals
? Advanced Tips
Divergence Analysis:
- Watch for price making new highs/lows while indicator doesn't
- Bearish divergence: Price higher highs, indicator lower highs
- Bullish divergence: Price lower lows, indicator higher lows
- Divergences often precede trend changes
Volume Confirmation:
- Combine with volume indicators
- Strong trends should have volume support
- Low volume during gray periods confirms ranging conditions
- Volume spikes during color changes validate signals
News Event Management:
- Avoid trading during high-impact news
- Gray signals often appear before major announcements
- Resume trading after market settles post-news
- Use smaller positions during news-heavy periods
Technical Specifications
- Indicator Type: Overlay indicator (displays on price chart)
- Buffer Count: 10 internal calculation buffers
- Plot Count: 1 color-coded line
- Minimum Bars Required: Automatically calculated based on parameters
- Performance: Optimized with fixed logging intervals to prevent terminal spam
Advanced Features
Market Regime Detection
The indicator automatically identifies three market conditions:
- Trending Markets: Reduced smoothing, increased responsiveness
- Choppy Markets: Increased smoothing, extended periods
- Balanced Markets: Standard parameter usage
Logging System
Features a sophisticated logging system with:
- Throttled information output
- Trend change notifications
- Debug information with time-based intervals
- Critical error reporting
This indicator represents a significant advancement in technical analysis, combining multiple mathematical approaches with adaptive intelligence to provide traders with a comprehensive market analysis tool suitable for various trading styles and market conditions.