OPEN-SOURCE SCRIPT

11-MA Institutional System (ATR+HTF Filters)

37
11-MA Institutional Trading System Analysis.

This is a comprehensive Trading View Pine Script indicator that implements a sophisticated multi-timeframe moving average system with institutional-grade filters. Let me break down its key components and functionality:

🎯 Core Features

1. 11 Moving Average System. The indicator plots 11 customizable moving averages with different roles:
MA1-MA4 (5, 8, 10, 12): Fast-moving averages for short-term trends
MA5 (21 EMA): Short-term anchor - critical pivot point
MA6 (34 EMA): Intermediate support/resistance
MA7 (50 EMA): Medium-term bridge between short and long trends
MA8-MA9 (89, 100): Transition zone indicators
MA10-MA11 (150, 200): Long-term anchors for major trend identification
Each MA is fully customizable:
Type: SMA, EMA, WMA, TMA, RMA
Color, width, and enable/disable toggle

📊 Signal Generation System

Three Signal Tiers: Short-Term Signals (ST)

Trigger: MA8 (EMA 8) crossing MA21 (EMA 21)

Filters Applied:

✅ ATR-based post-cross confirmation (optional)
✅ Momentum confirmation (RSI > 50, MACD positive)
✅ Volume spike requirement
✅ HTF (Higher Timeframe) alignment
✅ Strong candle body ratio (>50%)
✅ Multi-MA confirmation (3+ MAs supporting direction)
✅ Price beyond MA21 with conviction
✅ Minimum bar spacing (prevents signal clustering)
✅ Consolidation filter
✅ Whipsaw protection (ATR-based price threshold)


Medium-Term Signals (MT)
Trigger: MA21 crossing MA50
Less strict filtering for swing trades
Major Signals
Golden Cross: MA50 crossing above MA200 (major bullish)
Death Cross: MA50 crossing below MA200 (major bearish)
🔍 Advanced Filtering System1. ATR-Based ConfirmationPrice must move > (ATR × 0.25) beyond the MA after crossover
This prevents false signals during low-volatility consolidation.2. Momentum Filters
RSI (14)
MACD Histogram
Rate of Change (ROC)
Composite momentum score (-3 to +3)

3. Volume Analysis
Volume spike detection (2x MA)
Volume classification: LOW, MED, HIGH, EXPL
Directional volume confirmation

4. Higher Timeframe Alignment
HTF1: 60-minute (default)
HTF2: 4-hour (optional)
HTF3: Daily (optional)
Signals only trigger when current TF aligns with HTF trend

5. Market Structure Detection
Break of Structure (BOS): Price breaking recent swing highs/lows
Order Blocks (OB): Institutional demand/supply zones
Fair Value Gaps (FVG): Imbalance areas for potential fills

📈 Comprehensive DashboardReal-Time Metrics Display:[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}MetricDescriptionPriceCurrent close priceTimeframeCurrent chart timeframeSHORT/MEDIUM/MAJORTrend classification (🟢BULL/🔴BEAR/⚪NEUT)HTF TrendsHigher timeframe alignment indicatorsMomentumSTR↑/MOD↑/WK↑/WK↓/MOD↓/STR↓VolatilityLOW/MOD/HIGH/EXTR (based on ATR%)RSI(14)Color-coded: >70 red, <30 greenATR%Volatility as % of priceAdvanced Dashboard Features (Optional):

Price Distance from Key MAs

vs MA21, MA50, MA200 (percentage)
Color-coded: green (above), red (below)



MA Alignment Score

Calculates % of MAs in proper order
🟢 for bullish alignment, 🔴 for bearish



Trend Strength

Based on separation between MA21 and MA200
NONE/WEAK/MODERATE/STRONG/EXTREME



Consolidation Detection

Identifies low-volatility ranges
Prevents signals during sideways markets


⚙️ Customization OptionsFilter Toggles:
☑️ Require Momentum
☑️ Require Volume
☑️ Require HTF Alignment
☑️ Use ATR post-cross confirmation
☑️ Whipsaw filter
Min bars between signals (default: 5)
Dashboard Styling:
9 position options
6 text sizes
Custom colors for header, rows, and text
Toggle individual metrics on/off
🎨 Visual Elements

Signal Labels:

ST▲/ST▼ (green/red) - Short-term
MT▲/MT▼ (blue/orange) - Medium-term
GOLDEN CROSS / DEATH CROSS - Major signals



Volume Spikes:

Small labels showing volume class + direction
Example: "HIGH🟢" or "EXPL🔴"



Market Structure:

Dashed lines for Break of Structure levels
Automatic detection of swing highs/lows


🔔 Alert Conditions

Pre-configured alerts for:
Short-term bullish/bearish crosses
Medium-term bullish/bearish crosses
Golden Cross / Death Cross
Volume spikes

💡 Key Strengths
Institutional-Grade Filtering: Multiple confirmation layers reduce false signals
Multi-Timeframe Analysis: Ensures alignment across timeframes
Adaptive to Market Conditions: ATR-based thresholds adjust to volatility
Comprehensive Dashboard: All critical metrics in one view
Highly Customizable: 100+ input parameters
Signal Quality Over Quantity: Strict filters prioritize high-probability setups

⚠️ Usage Recommendations
Best for: Swing trading and position trading
Timeframes: Works on all TFs, optimized for 15m-Daily
Markets: Stocks, Forex, Crypto, Indices
Signal Frequency: Conservative (quality over quantity)
Combine with: Support/resistance, price action, risk management

🔧 Technical Implementation Notes
Uses Pine Script v6 syntax
Efficient calculation with minimal repainting
Maximum 500 labels for performance
Security function for HTF data (no lookahead bias)
Array-based MA alignment calculation
State variables to track signal spacing
This is a professional-grade trading system that combines classical technical analysis (moving averages) with modern institutional concepts (market structure, order blocks, multi-timeframe alignment).


The extensive filtering system is designed to eliminate noise and focus on high-probability trade setups.

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.