OPEN-SOURCE SCRIPT

Directional EMA - For Loop | Lyro RS

793
Directional EMA - For Loop | Lyro RS

Introduction
This indicator combines multi-type moving averages, loop-based momentum scoring, and divergence detection for adaptive trend and reversal analysis.

Key Features:

Multiple Moving Average Selection System: Choose from 16 different MA types - HMA, ALMA and JMA etc. To match your style best.

For Loop Based Scoring: Uses a From / To system to calculate cumulative buying/selling pressure across recent price action.

Signal Threshold: Long / Short threshold levels to control the sensitivity for different market conditions.

Divergence Detection: Regular bullish / bearish with clear labels for potential reversal points.
Clean Visuals: Multiple color themes with table and color based indicator line for easy reading.

How It Works:

Core Calculation: The indicator first creates a directional signal by comparing price to your selected moving average, normalized for current volatility.
Loop Analysis: This signal feeds into a for-loop that scores recent price history, generating a cumulative momentum value.

Signal Generation:

Bullish signals trigger when the score crosses above the Upper Threshold
Bearish signals trigger when the score crosses below the Lower Threshold
Divergence Alerts: Automatically detects when price makes new highs/lows that aren't confirmed by the oscillator.

Practical Use:

Trend Identification: The color-coded oscillator and signal table help confirm trend direction.
Reversal Warning: Divergence labels highlight potential trend exhaustion points for careful watch.

Customization:

Adjust MA type and length for sensitivity tuning
Modify loop parameters (From/To) to change analysis depth
Fine-tune threshold levels for signal frequency
Enable/disable divergence detection as needed

⚠️ Disclaimer
This tool is for technical analysis education only. It does not guarantee results or constitute financial advice. Always use proper risk management and combine with other analysis methods. Past performance doesn't predict future results.

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。