STM APEX Pro - Smart Money Multi-Timeframe System

This professional-grade indicator combines multiple institutional trading methodologies into a comprehensive market structure analysis tool suitable for all timeframes and asset classes.
═══════════════════════════════════════════════════════════════
CORE METHODOLOGY
The indicator employs a multi-layered approach to identifying high-probability trading setups:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. MARKET STRUCTURE DETECTION (BOS/CHoCH)
- Dynamically identifies Break of Structure (BOS) and Change of Character (CHoCH) using swing pivot analysis
- Configurable lookback period (3-50 bars) for structure sensitivity
- Validates structural breaks with price-close confirmation to reduce false signals
- Trend state machine tracks bullish/bearish/neutral market conditions
The algorithm maintains a trend state variable that updates when:
- Price breaks above the most recent swing high (uptrend confirmation)
- Price breaks below the most recent swing low (downtrend confirmation)
- Trend reversal occurs when opposite structure break happens
BOS signals indicate trend continuation, while CHoCH signals indicate potential trend reversal.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2. SUPPLY & DEMAND ZONE MAPPING
- Identifies institutional accumulation/distribution zones using pivot strength analysis
- Zones formed at significant swing points where price rejected strongly
- Extended projection shows active zones for future price interaction
- Strength-based filtering (1-10 bars) removes weak/invalid zones
- Maximum 10 active zones per type to maintain chart clarity
Zone creation criteria:
- Supply zones: Bearish candle (close < open) at pivot high
- Demand zones: Bullish candle (close > open) at pivot low
- Zone height calculated from candle body (open to close range)
- Tolerance buffer (±0.2%) for price-zone interaction detection
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
3. DUAL EMA TREND FILTER
- Fast EMA (default 50) and Slow EMA (default 200) for trend confirmation
- Calculates EMA distance percentage to measure trend strength
- Requires minimum 0.3% separation to confirm directional bias
- Prevents counter-trend signals in ranging markets
Market Bias Determination:
- BULLISH: Fast EMA > Slow EMA AND distance > 0.3%
- BEARISH: Fast EMA < Slow EMA AND distance > 0.3%
- NEUTRAL: Distance < 0.3% (ranging/consolidation)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4. SIGNAL GENERATION ALGORITHM
Primary signals require:
- Structural break (BOS/CHoCH) + EMA trend alignment
- Minimum 10-bar spacing between signals to prevent over-trading
- 3-bar cooldown between opposing signals
Alternative signals trigger on:
- Price interaction with supply/demand zones (±0.2% tolerance)
- MACD crossover confirmation (12,26,9 standard parameters)
- EMA trend alignment
Signal Sensitivity Modes:
- LOW: 1.5x threshold multiplier (fewer, higher-quality signals)
- MEDIUM: 1.0x standard threshold (balanced)
- HIGH: 0.5x threshold multiplier (more frequent signals)
Anti-Overtrading Mechanism:
- Tracks last bullish and bearish signal bar indices
- Enforces minimum 10-bar gap between same-direction signals
- Requires 3-bar gap between opposite signals
- Prevents signal clusters in choppy conditions
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
5. REFERENCE LEVEL SYSTEM (4-Line Framework)
Each setup generates:
- ENTRY LEVEL: Calculated from candle close (conservative) or wick (aggressive)
- INVALIDATION LEVEL: ATR-based stop loss (1.5x ATR default)
- PROJECTED TARGET 1: First profit target (1.5R default)
- PROJECTED TARGET 2: Extended profit target (3.0R default)
- OPTIONAL TARGET 3: Advanced swing target (5.0R+)
Level Calculation Logic:
For Bullish Setups:
- Entry = close (or low if wick mode)
- Invalidation = Entry - (ATR × multiplier)
- Risk Distance = Entry - Invalidation
- TP1 = Entry + (Risk Distance × P1 R:R)
- TP2 = Entry + (Risk Distance × P2 R:R)
For Bearish Setups:
- Entry = close (or high if wick mode)
- Invalidation = Entry + (ATR × multiplier)
- Risk Distance = Invalidation - Entry
- TP1 = Entry - (Risk Distance × P1 R:R)
- TP2 = Entry - (Risk Distance × P2 R:R)
All levels extend to chart right edge with price scale labels for easy reference.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
6. RISK ASSESSMENT MODULE
- Real-time ATR calculation (14-period standard)
- Risk level categorization: NORMAL vs HIGH
- Threshold: 1.8+ ATR multiplier = HIGH risk
- Dynamic adjustment based on volatility environment
Risk Context Display:
- GREEN "NORMAL" = Standard risk conditions
- YELLOW "HIGH" = Elevated volatility, wider stops required
This helps traders understand when market conditions require larger stops or reduced position sizing.
═══════════════════════════════════════════════════════════════
VISUAL COMPONENTS
- Market Bias Badge: Real-time trend state (BULLISH/BEARISH/NEUTRAL)
- Signal Panel: Current setup parameters with all entry/exit levels
- Setup Markers: Mobile-optimized dual-circle indicators at signal bars
- Zone Boxes: Semi-transparent supply/demand rectangles with adjustable extension
- Reference Lines: Color-coded entry, invalidation, and target lines with right-edge extension
Mobile Optimization:
- Large visual markers (dual-circle design) visible on small screens
- Optional text labels can be disabled for cleaner mobile display
- Adjustable panel positions (4 corner options)
- Minimal clutter with intelligent object limits
═══════════════════════════════════════════════════════════════
CUSTOMIZATION OPTIONS
Display Controls:
- Toggle all components individually (zones, structure, signals, EMAs, levels)
- 3 sensitivity modes (Low/Medium/High) for different trading styles
- Fully configurable colors for all visual elements
- Mobile-friendly mode (toggle labels/text for clean mobile charts)
- Position adjustable panels (Top/Bottom × Left/Right = 4 positions)
- Optional P3 target for swing traders
Zone Settings:
- Strength adjustment (1-10 bars) controls zone significance
- Extension length (10-200 bars) for future projection
- Customizable colors with transparency
Structure Settings:
- Lookback period (3-50 bars) for swing detection
- Separate colors for BOS vs CHoCH signals
Level Settings:
- Entry method: Close (safer) vs Wick (aggressive)
- ATR multiplier for invalidation (0.5x - 5.0x)
- Customizable R:R ratios for all profit targets
═══════════════════════════════════════════════════════════════
ALERT SYSTEM
Native TradingView Alerts:
- Bullish setup alerts (once per bar close)
- Bearish setup alerts (once per bar close)
- Standard alert message format with key levels
Optional Telegram Integration:
- User provides their own Chat ID (not pre-configured)
- JSON webhook format for automation
- Includes symbol, bias, risk level, and all trading levels
- Compatible with Telegram Bot API webhooks
Alert Frequency:
- once_per_bar_close prevents alert spam
- Respects signal filtering (10-bar minimum spacing)
═══════════════════════════════════════════════════════════════
TECHNICAL SPECIFICATIONS
Performance Optimization:
- Max objects: 500 boxes, 500 labels, 500 lines
- Intelligent object cleanup (removes oldest when limit reached)
- Efficient array management for zone storage
- Lightweight calculations suitable for real-time streaming
Compatibility:
- All TradingView timeframes (1m - 1M)
- All asset classes (Forex, Crypto, Stocks, Indices, Commodities)
- Pine Script v5 for latest platform features
- Mobile app compatible
Data Requirements:
- Minimum 200 bars history for EMA calculations
- ATR requires 14 bars warmup period
- Structure detection adapts to available data
═══════════════════════════════════════════════════════════════
WHAT MAKES THIS ORIGINAL
Unlike basic SMC indicators that only show structure or zones in isolation, APEX Pro combines:
1. Multi-Confirmation Signal Logic
- Requires structure + momentum + trend alignment
- Alternative path via zone interaction + MACD
- Prevents low-quality signals through multiple filters
2. Adaptive Risk Assessment
- Context-aware risk labeling based on volatility
- Helps traders adjust position sizing to conditions
- Threshold-based HIGH/NORMAL categorization
3. Professional Money Management Framework
- R:R-based profit targets (not arbitrary levels)
- ATR-based invalidation (volatility-adjusted)
- Scalable from day trading (1.5R) to swing (5R+)
4. Anti-Overtrading Architecture
- Bar spacing enforcement between signals
- Cooldown period between opposing signals
- Prevents signal clustering in choppy markets
5. Mobile-Optimized Interface
- Dual-circle markers visible on small screens
- Toggleable text/labels for clean display
- Repositionable panels for user preference
- Clear visual hierarchy with color coding
6. Algorithmic Approach to Classic Concepts
- Synthesizes institutional concepts (order blocks, liquidity, structure)
- Retail-friendly visualization and risk parameters
- Quantified criteria remove subjective interpretation
- Systematic rules allow for backtesting and automation
The combination of these elements creates a comprehensive trading system rather than just another indicator displaying support/resistance or moving averages.
═══════════════════════════════════════════════════════════════
EDUCATIONAL VALUE
This indicator helps traders understand:
- How institutional players leave footprints via supply/demand imbalances
- Why market structure breaks signal potential trend changes
- The importance of multi-timeframe trend confirmation
- Proper risk management using ATR-based stops
- Risk:Reward ratio planning for profitable trading
Rather than "black box" signals, all components are explained and customizable, allowing traders to learn the methodology while using the tool.
═══════════════════════════════════════════════════════════════
DISCLAIMER
This indicator provides technical analysis levels based on price action, mathematical calculations, and algorithmic pattern recognition. It does not constitute financial advice, investment recommendations, or trading signals to be followed blindly.
All trading involves substantial risk of loss. Past performance of any trading system or methodology is not indicative of future results. Users should:
- Combine this tool with their own analysis and risk management
- Never risk more than they can afford to lose
- Understand that no indicator guarantees profitable trades
- Practice proper position sizing and money management
- Consider their own financial situation and risk tolerance
The developer makes no claims about profitability or win rates. This is a technical analysis tool for educational and informational purposes only.
═══════════════════════════════════════════════════════════════
SUPPORT & USAGE
For optimal results:
1. Start with default settings on your preferred timeframe
2. Observe how signals align with obvious structure breaks
3. Adjust sensitivity based on your trading style (scalper = High, swing = Low)
4. Use higher timeframe bias to filter lower timeframe entries
5. Always confirm setups match your own analysis
The indicator works best when used as part of a complete trading plan, not as a standalone signal provider.
═══════════════════════════════════════════════════════════════
نص برمجي للمستخدمين المدعوين فقط
يمكن فقط للمستخدمين الذين تمت الموافقة عليهم من قبل المؤلف الوصول إلى هذا البرنامج النصي. ستحتاج إلى طلب الإذن والحصول عليه لاستخدامه. يتم منح هذا عادةً بعد الدفع. لمزيد من التفاصيل، اتبع تعليمات المؤلف أدناه أو اتصل ب stm29112025 مباشرة.
لا توصي TradingView بالدفع مقابل برنامج نصي أو استخدامه إلا إذا كنت تثق تمامًا في مؤلفه وتفهم كيفية عمله. يمكنك أيضًا العثور على بدائل مجانية ومفتوحة المصدر في نصوص مجتمعنا.
تعليمات المؤلف
إخلاء المسؤولية
نص برمجي للمستخدمين المدعوين فقط
يمكن فقط للمستخدمين الذين تمت الموافقة عليهم من قبل المؤلف الوصول إلى هذا البرنامج النصي. ستحتاج إلى طلب الإذن والحصول عليه لاستخدامه. يتم منح هذا عادةً بعد الدفع. لمزيد من التفاصيل، اتبع تعليمات المؤلف أدناه أو اتصل ب stm29112025 مباشرة.
لا توصي TradingView بالدفع مقابل برنامج نصي أو استخدامه إلا إذا كنت تثق تمامًا في مؤلفه وتفهم كيفية عمله. يمكنك أيضًا العثور على بدائل مجانية ومفتوحة المصدر في نصوص مجتمعنا.