ST Matrix
- Experts
- Domantas Juodenis
- 버전: 1.1
- 활성화: 20
ST MATRIX — Institutional Symmetrical Triangle EA
MetaTrader 5 | Netting & Hedging | All Brokers | Version 1.01
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHAT IS ST MATRIX?
ST Matrix is a professional Expert Advisor built around the Symmetrical Triangle — one of the most reliable compression breakout patterns in technical analysis. The EA enforces a strict 5-point structure (H1 → L2 → H3 → L4 → breakout), applies institutional-grade filters before every entry, and manages trades with dynamic ATR-based stops and multi-level take profits.
Every element — from the dark navy chart skin to the Bloomberg-style dashboard to the silver trendlines on the chart — is designed to match the standard of professional algorithmic trading systems.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
THE PATTERN
A valid triangle requires four confirmed swing points forming converging trendlines — descending highs (H1 → H3) and ascending lows (L2 → L4) — plus a breakout candle that closes beyond the trendline with volume expansion. ST Matrix scores every triangle 0–100 based on symmetry, height, formation length, and volume contraction. Trades only fire above your minimum quality threshold (default 60). The grade — PRIME / GOOD / WATCH — appears live on the chart badge.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ENTRY FILTERS
• Breakout candle must close beyond trendline by a pip buffer
• Volume must spike above the 20-bar average by a set multiplier
• EMA 50/200 trend filter — only buy above, only sell below
• Candle body filter — doji and inside bars are rejected
• Spread guard — no entries during abnormal spread spikes
• Session filter — optional GMT trading window restriction
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TRADE MANAGEMENT
Stop Loss: Placed below L4 (buy) or above H3 (sell) using ATR × multiplier. Always respects broker minimum stop distance.
Take Profit 1: 1:1 R:R — partial close (50% default) locks in profit early.
Take Profit 2: 2:1 R:R — main target placed on chart.
Break-Even: Moves SL to entry once profit reaches 1× risk. Only fires at bar open to avoid tick-level broker rejections.
Trailing Stop: ATR-based trail activates after break-even. Updates once per bar open only — eliminates race conditions that cause failed modification errors in live and tester environments.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RISK MANAGEMENT
Position size is calculated dynamically: (Balance × Risk%) ÷ (SL distance / tick size × tick value). The result is clamped to broker minimum, maximum, and position volume limit (SYMBOL_VOLUME_LIMIT). If the account cannot afford the minimum lot, the trade is skipped — the EA never forces an oversized position.
Daily drawdown guard halts new entries if equity falls a set % below the day's opening balance. Daily trade count limit prevents overtrading. Both reset automatically at midnight server time.
Filling mode (FOK / IOC / RETURN) is detected automatically from the symbol's properties — no manual configuration needed.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
VISUALS & DASHBOARD
Chart Skin (applied automatically):
• Background: near-black dark navy
• Bull candles: Silver | Bear candles: Silver Lightning
• Grid: ghost mode — barely visible, non-distracting
Triangle Overlay:
• Upper line: Silver trendline projected to apex
• Lower line: Silver Lightning trendline projected to apex
• Touch dots at each of the 4 swing points
• Apex convergence marker
• Quality badge: ▲ ST MATRIX PRIME 87%
Trade Markers:
• Entry arrows (silver-blue for buy, silver-violet for sell)
• Dotted SL and TP horizontal lines
Dashboard (Bloomberg-style dark panel):
• Account: Balance, Equity, Free Margin, Day P&L, Drawdown, Risk Level
• Market: Spread, ATR, Trend Bias, Session, Triangle Status, Quality Score
• EA Stats: Trades Today, Win Rate, Profit Factor, Avg Win/Loss, Peak Streaks
The dashboard can be minimised with a single click and is fully colour-customisable.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ACCOUNT COMPATIBILITY
✔ Netting accounts (auto-detected at startup)
✔ Hedging accounts
✔ ECN, STP, and market-maker brokers
✔ All filling modes (auto-selected)
✔ Tested: EURUSD H1 · XAUUSD D1 · GBPUSD M30
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RECOMMENDED SYMBOLS & TIMEFRAMES
Best results: EURUSD, GBPUSD, XAUUSD, NAS100, US30
Primary timeframe: H1 (most reliable triangle formations)
Also suitable: H4 (swing trading), M30 (active traders), D1 (position trading)
Not recommended: Exotic pairs with wide spreads, M15 and below
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
KEY INPUTS (defaults shown)
InpRiskPct = 1.0 Risk per trade (% of balance)
InpMaxDailyDD = 5.0 Daily drawdown halt (%)
InpMaxDailyTrades = 3 Max new entries per day
InpMinQualScore = 60 Min triangle quality score
InpSL_ATRMult = 1.5 SL distance (ATR multiplier)
InpTP1_RR = 1.0 Partial close target (R:R)
InpTP2_RR = 2.0 Main TP target (R:R)
InpBreakoutPips = 5.0 Breakout buffer beyond trendline
InpReqVolSpike = true Require volume expansion
InpUseTrend = true EMA trend direction filter
InpEMA_Fast / Slow = 50/200 Trend filter periods
InpSwingLookback = 5 Swing detection sensitivity
InpMinTriCandles = 20 Min triangle formation length
InpMaxTriCandles = 200 Max triangle formation length
InpUseBreakEven = true Break-even stop movement
InpUsePartial = true Partial close at TP1
InpUseTrailing = true ATR trailing stop
InpMagicNumber = 202501 Unique ID (change per instance)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INSTALLATION
1. Copy ST Matrix.mq5 to: MetaTrader 5 / MQL5 / Experts /
2. Open in MetaEditor — press F7 to compile (0 errors, 0 warnings)
3. Drag onto any H1 chart
4. Enable Auto Trading
5. The chart skin, trendlines, and dashboard appear automatically
Single file — no subfolders, no external dependencies.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BACKTESTING TIPS
• Use Every Tick Based on Real Ticks for accurate results
• Set a realistic spread (10–15 pts for EURUSD ECN)
• Minimum 12 months of data recommended
• Optimise: InpMinQualScore · InpSL_ATRMult · InpTP2_RR
• One instance per chart — use unique magic numbers per symbol
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ST MATRIX | Precision Pattern Detection · Smart Execution · Institutional Design
