OPEN-SOURCE SCRIPT
Impulse Trend Levels [BOSWaves]

Impulse Trend Levels [BOSWaves] - Momentum-Adaptive Trend Detection with Impulse-Driven Confidence Bands
Overview
Impulse Trend Levels [BOSWaves] is a momentum-aware trend identification system that tracks directional price movement through adaptive confidence bands, where band width dynamically adjusts based on impulse strength and freshness to reflect real-time conviction in the current trend direction.

Instead of relying on fixed moving average crossovers or static band multipliers, trend state, band positioning, and zone thickness are determined through impulse detection patterns, exponential decay modeling, and volatility-normalized momentum measurement.
This creates dynamic trend boundaries that reflect actual momentum intensity rather than arbitrary technical levels - contracting during fresh impulse conditions when trend conviction is high, expanding during impulse decay periods when directional confidence weakens, and incorporating momentum freshness calculations to reveal whether trends are accelerating or deteriorating.
Price is therefore evaluated relative to bands that adapt to momentum state rather than conventional static thresholds.
Conceptual Framework
Impulse Trend Levels is founded on the principle that meaningful trend signals emerge when price momentum intensity reaches significant thresholds relative to recent volatility rather than when price simply crosses moving averages.
Traditional trend-following methods identify directional changes through price-indicator crossovers, which often ignore the underlying momentum dynamics and conviction levels that sustain those moves. This framework replaces static-threshold logic with impulse-driven band construction informed by actual momentum strength and decay characteristics.
Three core principles guide the design:
This shifts trend analysis from static indicator levels into adaptive, momentum-anchored confidence boundaries.
Theoretical Foundation
The indicator combines exponential moving average smoothing, mean absolute deviation measurement, impulse detection methodology, and exponential decay tracking.
An EMA-based trend baseline provides directional reference, while Mean Absolute Deviation (MAD) offers volatility-normalized scaling for momentum measurement. Impulse detection identifies significant price movements relative to recent volatility, triggering fresh momentum readings that decay exponentially over time. Band multipliers interpolate between tight and wide settings based on calculated impulse freshness.
Four internal systems operate in tandem:
This design allows trend confidence to reflect actual momentum behavior rather than reacting mechanically to price formations.
How It Works
Impulse Trend Levels evaluates price through a sequence of momentum-aware processes:
Together, these elements form a continuously updating trend framework anchored in momentum reality.
Interpretation
Impulse Trend Levels should be interpreted as momentum-anchored trend confidence boundaries:
Impulse freshness, band width dynamics, and momentum normalization outweigh isolated price movements.
Signal Logic & Visual Cues
Impulse Trend Levels presents two primary interaction signals:
Retest detection provides secondary confirmation when price revisits inner band boundaries after signal buffer cooldown expires.
Alert generation covers trend state switches (long/short), retest occurrences, and impulse freshness decay below 50% threshold for systematic monitoring.
Strategy Integration
Impulse Trend Levels fits within momentum-informed and adaptive trend-following approaches:
Technical Implementation Details
Optimal Application Parameters
Timeframe Guidance:
Suggested Baseline Configuration:
These suggested parameters should be used as a baseline; their effectiveness depends on the asset's volatility profile, momentum characteristics, and preferred signal frequency, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.
Performance Characteristics
High Effectiveness:
Reduced Effectiveness:
Integration Guidelines
Disclaimer
Impulse Trend Levels [BOSWaves] is a professional-grade momentum and trend analysis tool. It uses volatility-normalized impulse detection with exponential decay modeling but does not predict future price movements. Results depend on market conditions, volatility characteristics, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates price structure, volume context, and comprehensive risk management.
Overview
Impulse Trend Levels [BOSWaves] is a momentum-aware trend identification system that tracks directional price movement through adaptive confidence bands, where band width dynamically adjusts based on impulse strength and freshness to reflect real-time conviction in the current trend direction.
Instead of relying on fixed moving average crossovers or static band multipliers, trend state, band positioning, and zone thickness are determined through impulse detection patterns, exponential decay modeling, and volatility-normalized momentum measurement.
This creates dynamic trend boundaries that reflect actual momentum intensity rather than arbitrary technical levels - contracting during fresh impulse conditions when trend conviction is high, expanding during impulse decay periods when directional confidence weakens, and incorporating momentum freshness calculations to reveal whether trends are accelerating or deteriorating.
Price is therefore evaluated relative to bands that adapt to momentum state rather than conventional static thresholds.
Conceptual Framework
Impulse Trend Levels is founded on the principle that meaningful trend signals emerge when price momentum intensity reaches significant thresholds relative to recent volatility rather than when price simply crosses moving averages.
Traditional trend-following methods identify directional changes through price-indicator crossovers, which often ignore the underlying momentum dynamics and conviction levels that sustain those moves. This framework replaces static-threshold logic with impulse-driven band construction informed by actual momentum strength and decay characteristics.
Three core principles guide the design:
- Trend direction should be determined by volatility-normalized momentum breaches, not simple price crossovers alone.
- Band width must adapt to impulse freshness, reflecting real-time confidence in the current trend.
- Momentum decay modeling reveals whether trends are maintaining strength or losing conviction.
This shifts trend analysis from static indicator levels into adaptive, momentum-anchored confidence boundaries.
Theoretical Foundation
The indicator combines exponential moving average smoothing, mean absolute deviation measurement, impulse detection methodology, and exponential decay tracking.
An EMA-based trend baseline provides directional reference, while Mean Absolute Deviation (MAD) offers volatility-normalized scaling for momentum measurement. Impulse detection identifies significant price movements relative to recent volatility, triggering fresh momentum readings that decay exponentially over time. Band multipliers interpolate between tight and wide settings based on calculated impulse freshness.
Four internal systems operate in tandem:
- Trend Baseline Engine: Computes EMA-smoothed price levels for directional reference and band anchoring.
- Volatility Measurement System: Calculates MAD to provide adaptive scaling that normalizes momentum across varying market conditions.
- Impulse Detection Logic: Identifies volatility-normalized price movements exceeding threshold levels, capturing momentum intensity and direction.
- Decay-Based Confidence Modeling: Applies exponential decay to impulse readings, converting raw momentum into time-weighted freshness metrics that drive band adaptation.
This design allows trend confidence to reflect actual momentum behavior rather than reacting mechanically to price formations.
How It Works
Impulse Trend Levels evaluates price through a sequence of momentum-aware processes:
- Baseline Calculation: EMA smoothing of open and close creates a directional trend reference that filters short-term noise.
- Volatility Normalization: MAD calculation over a specified lookback provides dynamic scaling for momentum measurement.
- Raw Impulse Detection: Price change over impulse lookback divided by MAD creates volatility-normalized momentum readings.
- Threshold-Based Activation: When normalized momentum exceeds threshold (1.0), impulse registers with absolute magnitude and directional sign.
- Exponential Decay Application: Between impulse events, stored impulse value decays exponentially via configurable decay rate.
- Freshness Conversion: Decaying impulse transforms into freshness metric (0-100%) representing current momentum conviction.
- Adaptive Band Construction: Band multiplier interpolates between minimum (fresh) and maximum (stale) settings based on freshness, then scales MAD to determine band width.
- Trend State Logic: Price crossing above upper band triggers bullish state; crossing below lower band triggers bearish state; state persists until opposite breach.
- Signal Generation: Trend state switches from bearish to bullish produce buy signals; bullish to bearish switches produce sell signals.
- Retest Identification: Price touching inner band edge after signal buffer period marks retests, with cooldown periods preventing excessive plotting.
Together, these elements form a continuously updating trend framework anchored in momentum reality.
Interpretation
Impulse Trend Levels should be interpreted as momentum-anchored trend confidence boundaries:
- Bullish Trend State (Cyan): Established when price closes above adaptive upper band, indicating upward momentum breach with associated confidence level.
- Bearish Trend State (Magenta): Established when price closes below adaptive lower band, signaling downward momentum breach with directional conviction.
- Trend Cloud: Visual gradient zone displays between outer and inner band edges, with opacity reflecting current trend state and confidence.
- Band Width Dynamics: Tighter bands indicate fresh impulse (high confidence), wider bands indicate impulse decay (reduced confidence).
- ▲ Buy Signals: Green upward triangles mark bullish trend state initiations at crossovers above upper band.
- ▼ Sell Signals: Red downward triangles mark bearish trend state initiations at crossovers below lower band.
- ✦ Retest Markers: Small diamonds identify price retouching inner band edge after sufficient buffer period from initial signal.
- Retest Extension Lines: Horizontal projections from retest points extend forward, marking potential support/resistance levels.
- Colored Candles: Optional bar coloring reflects current trend state for immediate visual reference. Note: The original chart candles must be disabled in chart settings for the trend-colored candles to display properly.
Impulse freshness, band width dynamics, and momentum normalization outweigh isolated price movements.
Signal Logic & Visual Cues
Impulse Trend Levels presents two primary interaction signals:
- Buy Signal (▲): Green label appears when trend state switches from bearish to bullish via upper band crossover, suggesting momentum shift to upside.
- Sell Signal (▼): Red label displays when trend state switches from bullish to bearish via lower band crossunder, indicating momentum shift to downside.
Retest detection provides secondary confirmation when price revisits inner band boundaries after signal buffer cooldown expires.
Alert generation covers trend state switches (long/short), retest occurrences, and impulse freshness decay below 50% threshold for systematic monitoring.
Strategy Integration
Impulse Trend Levels fits within momentum-informed and adaptive trend-following approaches:
- Momentum-Confirmed Entries: Use band crossovers as high-probability trend initiation points where volatility-normalized momentum exceeded threshold.
- Freshness-Based Position Sizing: Scale exposure based on impulse freshness - larger positions during fresh impulse periods, reduced sizing as impulse decays.
- Band-Width Risk Management: Expect wider price ranges when bands expand during decay, tighter ranges when bands contract during fresh impulse.
- Retest-Based Re-entry: Use inner band retests as lower-risk entry opportunities within established trends after initial signal cooldown.
- Cloud-Aligned Directional Bias: Favor trades aligning with current trend state rather than counter-trend positions.
- Multi-Timeframe Momentum Confirmation: Apply higher-timeframe impulse trend state to filter lower-timeframe entry precision.
Technical Implementation Details
- Core Engine: EMA-based baseline with MAD volatility measurement
- Impulse Model: Volatility-normalized momentum detection with directional sign capture
- Decay System: Exponential decay application (0.8-0.99 range) with freshness conversion
- Band Construction: Linear interpolation between min/max multipliers scaled by MAD
- Visualization: Gradient-filled cloud zones with bar coloring and signal labels
- Signal Logic: State-switch detection with retest buffer and cooldown mechanisms
- Performance Profile: Optimized for real-time execution across all timeframes
Optimal Application Parameters
Timeframe Guidance:
- 1 - 5 min: Micro-trend detection for scalping with responsive impulse settings
- 15 - 60 min: Intraday momentum tracking with balanced decay characteristics
- 4H - Daily: Swing-level trend identification with sustained impulse persistence
Suggested Baseline Configuration:
- Trend Length: 19
- Impulse Lookback: 5
- Decay Rate: 0.99
- MAD Length: 20
- Band Min (Fresh): 1.5
- Band Max (Stale): 1.9
- Signal Buffer Period: 10
- Show Trend Cloud: Enabled
- Color Bars: Enabled (requires disabling original chart candles in chart settings)
- Show Buy/Sell Signals: Enabled
These suggested parameters should be used as a baseline; their effectiveness depends on the asset's volatility profile, momentum characteristics, and preferred signal frequency, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
- Excessive signal noise: Increase Trend Length to demand smoother baseline crossovers or increase Impulse Lookback for less reactive momentum detection.
- Missed momentum shifts: Decrease Impulse Lookback to capture shorter-term momentum changes or reduce Decay Rate to allow faster impulse fade.
- Bands too tight/wide: Adjust Band Min and Band Max multipliers to modify confidence zone thickness across freshness spectrum.
- Impulse decays too quickly: Increase Decay Rate toward 0.99 to sustain impulse readings longer between fresh events.
- Impulse decays too slowly: Decrease Decay Rate toward 0.8 for faster momentum fade and more frequent band expansion.
- Unstable volatility scaling: Increase MAD Length to smooth volatility measurement and reduce sensitivity to short-term spikes.
- Too many retest markers: Increase retest cooldown period (55 bars hardcoded) or increase Signal Buffer Period to space out signals.
Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.
Performance Characteristics
High Effectiveness:
- Trending markets with clear momentum phases and directional persistence
- Instruments with consistent volatility characteristics where MAD scaling normalizes effectively
- Momentum continuation strategies entering on fresh impulse signals
- Trend-following approaches benefiting from adaptive confidence measurement
Reduced Effectiveness:
- Choppy, range-bound markets with frequent whipsaw crossovers
- Extremely low volatility environments where impulse threshold becomes difficult to breach
- News-driven or gapped markets with discontinuous momentum patterns
- Mean-reversion dominant conditions where momentum breaches quickly reverse
- Consolidation and sideways price action where trend-following methodologies inherently struggle due to lack of sustained directional movement
Integration Guidelines
- Confluence: Combine with BOSWaves structure, volume analysis, or traditional trend indicators
- Freshness Respect: Trust signals occurring during high impulse freshness periods with contracted bands
- Decay Awareness: Reduce position sizing or tighten stops as impulse decays and bands widen
- Retest Utilization: Treat inner band retests as continuation confirmation rather than reversal signals
- State Discipline: Maintain directional bias aligned with current trend state until opposite band breach occurs
Disclaimer
Impulse Trend Levels [BOSWaves] is a professional-grade momentum and trend analysis tool. It uses volatility-normalized impulse detection with exponential decay modeling but does not predict future price movements. Results depend on market conditions, volatility characteristics, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates price structure, volume context, and comprehensive risk management.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน