StrangerDoc
- エキスパート
- Hamdee Hayeealee
- バージョン: 5.3
StrangerDoc is a multi-strategy Expert Advisor for MetaTrader 5 that combines EMA/RSI trend filtering, a step-index grid engine, an opposite-side pyramid hedge, intelligent cross-side pair closing, and a full partial-close system — all working together to manage open positions dynamically and protect account equity.
StrangerDoc EA — Adaptive Grid + Hedge + Smart Close System for MT5
StrangerDoc is a fully automated Expert Advisor built for MetaTrader 5. It combines a trend-filtered step-index grid with an opposite pyramid hedge and a multi-mode smart close engine. Every entry is gated by EMA crossover and RSI filters, while every exit is managed by flexible partial close and pair-matching logic — giving you fine-grained control over both risk and profit-taking.
Key Features
Trend Filtering — EMA Crossover + RSI Gate Entries are only allowed when the fast EMA and slow EMA are aligned on the chosen timeframe. An optional RSI gate adds a second confirmation layer, blocking buys below a set RSI threshold and sells above it. An anti-flip cooldown prevents rapid direction changes caused by noise. All parameters are fully configurable: EMA periods, timeframe, slope filter, RSI levels, and cooldown seconds.
Step-Index Grid Engine (Buy + Sell) The grid opens positions at increasing distances from the last entry. Distance and lot size both scale using a step-index system — lot sizes grow via a configurable multiplier at each step, and grid spacing also expands with a distance multiplier. Buy and Sell grids run independently with their own lot start, multiplier, and distance settings. A cooldown between adds prevents overtrading during choppy conditions.
Opposite Pyramid Hedge (OppPyra) When one side of the grid is loss-frozen, the EA can automatically open a pyramid of positions on the opposite side to hedge exposure. The pyramid respects its own layer cap, lot factor, cooldown, minimum spacing, and total lot cap. A proximity guard prevents stacking positions too close together. Optional step-index mode aligns OppPyra lot sizing with the main grid engine. A global loss hedge mode can also activate OppPyra based on account-wide net loss.
Cross-Side Pair Close Pairs the most profitable open position with the farthest-from-price position on the opposite side and closes them together when their combined profit meets the minimum target. This works across all magic numbers (configurable) and supports an aggregate-winners mode that pools multiple winning positions to fund the closure of one large loser.
Same-Side Pair Close Pairs the best-profit and worst-profit positions on the same side, closing them together when the net profit clears the threshold. Useful for locking in intraday swings without closing the full grid.
Partial Close System — 5 Independent Modes Every close trigger in the EA supports partial closing. You set a percentage (0–100%) for each close type independently:
- AllClose — when the full portfolio profit target is hit
- SideBuy / SideSell — when a single side's profit target is hit
- SameSide — for same-side pair closes
- CrossSide — for cross-side pair closes
Setting any percentage to 100 gives a full close; setting it to 50 closes half the lot and leaves the rest running.
Per-Side Profit Target Close Independent profit targets for Buy side and Sell side. When either side's total floating profit reaches the target, that side's positions are closed (with the partial-close percentage applied).
Portfolio-Wide Close Target A separate account-scope profit target closes all open positions when the total floating P/L across all symbols meets the threshold.
Step Trailing Stop A step-based trailing stop activates after price moves a set number of points in profit, then trails in fixed steps. Applies to all positions or only to a specific magic number.
Base TP for First Entry Optionally set a take-profit in pips for the very first Buy and Sell entry. Subsequent grid entries operate without a hard TP, relying on the smart close engine.
Risk Guards
- Equity Drawdown Guard — freezes all new entries if drawdown exceeds a set money amount
- Per-Side Loss Freeze — stops adding to Buy or Sell independently when that side's floating loss exceeds a threshold
- ATR Volatility Filter — freezes entries when the current ATR is a multiple above the reference ATR captured at EA start
- Max Spread Filter — skips entries when the spread exceeds a set number of points
- Global Max Loss Freeze — when the account-wide net loss hits the limit, the EA switches to hedge-only mode via OppPyra
Cooldown Control Independent cooldown timers for Buy and Sell sides prevent rapid re-entry after a position opens.
Magic Number & Symbol Filtering All close logic can be scoped to the EA's own magic number or extended to all positions on the chart symbol. Cross-side close can optionally ignore magic numbers to pair positions from different EAs.
Input Groups at a Glance
| Group | Key Parameters |
|---|---|
| Inputs Baseline | Profit targets, magic number, close-all scope |
| Partial Close Settings | Percentage for each of the 5 close modes |
| Step-Index Grid | Lot start/multiplier, distance start/multiplier (Buy + Sell) |
| Guards / Kill-switch | Equity DD, side loss cap, ATR filter, spread filter |
| EMA Trend / Entry Control | Fast/slow EMA, timeframe, slope filter, anti-flip cooldown |
| RSI Filter | Period, buy/sell thresholds |
| Opposite Pyramid | Layers, lot factor, cooldown, proximity guard, step-index mode |
| Step Trailing | Activation distance, step size, magic filter |
| Cooldown Control | Seconds between adds (Buy + Sell) |
Recommended Use
- Works on any symbol and timeframe; best suited for ranging and trending forex majors
- Start with small lot sizes (e.g. 0.001) and wide grid distances to understand behaviour on your broker
- Enable the RSI filter and EMA crossover for directional conviction before running on live accounts
- Use partial close at 50–75% to lock profits while keeping a portion of the position running
Important Notes
- This EA opens multiple positions and uses a grid + hedge approach. Ensure your account has sufficient margin
- Always test on a demo account before going live
- Past performance is not a guarantee of future results
StrangerDoc EA — Built for MetaTrader 5 Version 5.3 | EMA + Step Grid + OppPyra Hedge + Partial Close
