BeiDou YuHeng
- エキスパート
- バージョン: 4.50
- アクティベーション: 5
**BeiDou YuHeng VWAP EA – MT4**
**Core Logic**
BeiDou YuHeng combines H1 Parabolic SAR for trend direction with M30 VWAP for precise entries. When SAR is bullish, only long trades are taken; when bearish, only shorts. Entry requires a two-step confirmation: price pierces VWAP (low below for long, high above for short), then a subsequent M30 candle reclaims it (low ≥ VWAP for long, high ≤ VWAP for short). This filters false breakouts.
**Flexible Timeframes**
SAR and VWAP periods are independently configurable (default M30 for both). The entry timeframe is the chart timeframe, allowing adaptation to different trading styles.
**Risk Management**
Stop loss is dynamic and trails VWAP: initial SL = VWAP ± k×ATR (k default 0.5). It only moves in the favorable direction, never backward. Take profit supports two modes: fixed risk-reward ratio (default 2R) or fixed points. Single-trade risk can be percentage-based or fixed lot. Daily max loss circuit breaker, max positions, and spread filter are included.
**10-Dimension Signal Rating**
Each signal is scored out of 100 across: SAR trend strength, SAR-price distance, M30 close position, pierce depth & reclaim quality, volatility, RSI, volume exhaustion, MACD momentum, market regime (ADX), and a base score. Ratings adjust lot size: A (≥80) = 100%, B (60-79) = 75%, C (<60) = 50%. An optional hard filter (`MinSignalScore`) can skip low-quality signals.
**Martingale Add-On**
Optional martingale with adjustable multiplier (default 1.5). A losing close increases the level; a winning close resets to zero. Max level limit (default 5) pauses trading when reached. Final lot = base lot × rating factor × martingale factor (works in both risk% and fixed lot modes).
**Direction & Time Controls**
Three one-click buttons: Both, Long Only, Short Only. Trading session filter supports start/end times, cross-midnight, and automatically blocks weekends. Cooldown after any close (hours configurable) and stop-after-TP until next server midnight are available. Invalid pending orders are auto-deleted: BuyStop when high < VWAP, SellStop when low > VWAP.
**Engineering Features**
Multi-symbol and multi-timeframe isolation via derived magic numbers, separate state files, and unique object prefixes. Full restart takeover: reads state file, scans positions/pending orders, and historical trades to resume correctly—including martingale level recovery (v4.5 fixes ordering of multiple closes). Non-repaint VWAP calculation with daily reset. State file includes version control. Clean dark-themed UI panel shows account, market, positions (with SL/TP monetary values), signal status, rating, martingale level, session, cooldown, and more.
**Recommendations**
Best for EURUSD, GBPUSD, USDJPY, gold, and major indices on M30. Suggested: risk 1%, martingale 1.5, max 5 levels, RR 2.0, session 01:00–12:59 server time. Test on demo first.
**Risk Warning**
Martingale can rapidly increase exposure. Always set MaxMartingaleLevel and risk ≤1%. Past performance does not guarantee future results.
