Skip to product information
Vega Risk Shield #048

Vega Risk Shield — User Guide
1. Overview
Vega Risk Shield EA is a risk-focused Expert Advisor for MetaTrader 5.
Its core purpose is to protect trading equity by combining:
• ATR-based SL/TP management
• Dynamic Position Sizing (risk % or fixed lot)
• Equity Guard (daily loss limit, max drawdown, minimum equity)
It can run in Risk Manager mode only (default) or trade automatically using a simple ATR
Channel Breakout strategy.
2. Input Parameters
Symbol & Magic
• InpSymbol: Leave blank = current chart symbol, or enter symbol manually (e.g.,
"XAUUSD").
• InpMagic: Unique identifier for EA’s trades.
Entry Signal (optional)
• InpSignalMode:
o Signal_None → EA works as a Risk Manager (no trades).
o Signal_ATR_Channel_Breakout → EA auto-trades using ATR channel breakout.
• InpMAPeriod: EMA period for baseline.
• InpATRPeriodSignal: ATR period for entry channel.
• InpATRMultEntry: ATR multiplier for breakout levels.
Risk & Position Sizing
• InpRiskMode:
o Risk_FixedLot → Use fixed lot size.
o Risk_BalancePercent → Lot size = % risk of account balance.
• InpFixedLot: Lot size if fixed mode is selected.
• InpRiskPercent: % of balance risk per trade (e.g., 1.0 = 1%).
• InpATRPeriodSLTP: ATR period for SL/TP calculation.
• InpSL_ATR_Mult: StopLoss distance = ATR × multiplier.
• InpTP_ATR_Mult: TakeProfit distance = ATR × multiplier.• InpUseBreakeven: Move SL to BE after profit ≥ ATR × multiplier.
• InpUseATRTrailing: Enable ATR-based trailing stop.
Equity Guard
• InpEquityGuardEnabled: Enable/disable guard.
• InpMaxDailyLossPct: Daily loss limit (% of equity at session start).
• InpMaxDrawdownPct: Maximum allowed drawdown since session start.
• InpMinEquityToTrade: Block trading if equity falls below this.
• InpDailyResetHour: Session reset hour (broker server time).
Execution Filters
• InpMaxSpreadPoints: Maximum spread (in points) allowed to open trade.
• InpSlippagePoints: Allowed slippage (points).
• InpMaxOpenPositions: Maximum simultaneous trades by this EA.
• InpAllowLong / InpAllowShort: Allow buy/sell.
Display
• InpShowPanel: Show/hide on-chart status panel.
3. Trading Logic
Risk Manager Mode
• No trades are opened.
• EA monitors equity guard rules and manages existing trades (breakeven + trailing).
ATR Channel Breakout Mode
• EMA baseline ± ATR × multiplier defines channel.
• If price > upper channel → Buy.
• If price < lower channel → Sell.
• Lot size, SL, and TP calculated dynamically based on risk settings.
4. Equity Guard Rules
• Trading stops if:
o Equity < MinEquityToTradeo Daily loss ≥ MaxDailyLossPct
o Drawdown ≥ MaxDrawdownPct
• Panel shows status: OK or BLOCKED.
5. Recommended Settings (Safe Start)
For EURUSD M15
• Risk Mode: Balance %
• Risk Percent: 1.0
• SL = ATR × 2, TP = ATR × 3
• MaxDailyLoss = 5%, MaxDrawdown = 20%
For XAUUSD H1
• Risk Percent: 0.5 (due to high volatility)
• ATR Period: 14
• Entry ATR Multiplier: 1.2–1.5
• SL = ATR × 2.5, TP = ATR × 4

You may also like