Update README to reflect v8 features and current defaults

Add scaled entry, time-based exit, hard TP, breakeven+ docs.
Sync all parameter defaults (ADX 25, RSI 35/65, ATR max 2.2, etc).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Neo Malesa
2026-03-08 10:07:16 +10:00
co-authored by Claude Opus 4.6
parent aa543abd62
commit b5606ebc7d
+42 -22
View File
@@ -15,31 +15,42 @@ The EA calculates a **Z-Score** — how many standard deviations price is from i
| Filter | Condition | Purpose |
|--------|-----------|---------|
| ADX | < 20 | Market is ranging, not trending (mean-reversion only works in ranges) |
| RSI(14) | < 30 for BUY, > 70 for SELL | Double-confirms the extreme with oversold/overbought |
| Volatility | ATR(14)/ATR(50) between 0.5–1.7× | Skips dead markets and volatile spikes/near-breakouts |
| ADX | < 25 | Market is ranging, not trending (mean-reversion only works in ranges) |
| RSI(14) | < 35 for BUY, > 65 for SELL | Double-confirms the extreme with oversold/overbought |
| Volatility | ATR(14)/ATR(50) between 0.5–2.2× | Skips dead markets and volatile spikes/near-breakouts |
| Spread | < 50 points | Avoids bad fills during illiquid conditions |
| Time window | 09:00–18:00 server time | London + early NY session only (avoids late NY chop) |
Additionally, entries are blocked during high-impact news events and when any capital protection limit has been hit.
### Scaled Entry — "Prove it before going all-in"
When enabled (default), the EA enters with only **50% of the calculated lot size**. If price moves +0.3× ATR in the trade's favor, the remaining 50% is added. This reduces loss exposure on trades that immediately reverse.
### Exit — 3-Stage Profit Management
Once in a trade, the EA manages the position in three stages:
| Stage | Trigger | Action | Remaining |
|-------|---------|--------|-----------|
| **TP1** | +0.5× ATR profit | Close **50%**, move SL to breakeven | 50% |
| **TP2** | +2.0× ATR profit | Close another **25%** (half of remaining) | ~25% |
| **TP1** | +1.0× ATR profit | Close **50%**, move SL to breakeven+ | 50% |
| **TP2** | +2.0× ATR profit | Close another **50% of remaining** | ~25% |
| **Runner** | Trailing stop | Let the last ~25% ride with loose trail | Until stopped |
A **hard TP at 5.0× ATR** is set on the order as a safety net for disconnects.
**Breakeven+:** After TP1, the SL moves to entry + spread + 0.2× ATR, locking in a small profit rather than raw breakeven.
**Stepped trailing stop:**
- **No trailing** until price moves +1.0× ATR from entry (prevents early stop-outs on normal pullbacks)
- **Tight trail (1.0× ATR)** between TP1 and TP2 — locks gains without choking the move
- **Loose trail (2.0× ATR)** after TP2 — gives the runner room to breathe
- **Tight trail (1.0× ATR)** after TP1, before TP2 — locks gains without choking the move
- **Loose trail (1.5× ATR)** after TP2 — gives the runner room to breathe
- Optional **asymmetric trailing** — separate multipliers for buys vs sells (gold often trends stronger upward)
### Time-Based Exit — "Cut stalled trades"
If a trade hasn't moved at least +0.3× ATR in its favor after **8 bars** (40 minutes on M5), it is closed automatically. This prevents positions from lingering in dead zones where they're likely to eventually hit the stop.
### News Protection
The EA reads the **MQL5 Economic Calendar** automatically and classifies USD events into two tiers:
@@ -55,7 +66,7 @@ When a VHI event is approaching, the EA **automatically closes all open position
| Layer | Default | Trigger | Recovery |
|-------|---------|---------|----------|
| **Daily loss** | 4% | Equity drawdown from day's opening balance | Closes all positions, auto-resets next day |
| **Daily loss** | 6% | Equity drawdown from day's opening balance | Closes all positions, auto-resets next day |
| **Weekly loss** | 10% | Equity drawdown from week's opening balance | Closes all positions, auto-resets next week |
| **Equity drawdown** | 15% from peak | Drawdown from all-time high equity | Closes all positions, **halts EA** — must remove and re-attach |
@@ -72,7 +83,7 @@ Each trade risks **10% of account balance**. The SL is placed at **2.0× ATR** f
|-----------|---------|-------------|
| `TradeSymbol` | GOLD | Symbol to trade |
| `InpEntryZ` | 2.5 | Z-Score threshold for entry (2.3–2.7 sweet spot) |
| `InpADXFilter` | 20 | ADX must be below this value (ranging market) |
| `InpADXFilter` | 25 | ADX must be below this value (ranging market) |
| `InpRiskPct` | 10.0 | Risk % of balance per trade |
| `InpATRStop` | 2.0 | ATR multiplier for stop loss |
| `InpStartHour` | 9 | Trading window start, server hour (London open) |
@@ -82,14 +93,23 @@ Each trade risks **10% of account balance**. The SL is placed at **2.0× ATR** f
### Partial Profit & Trailing
| Parameter | Default | Description |
|-----------|---------|-------------|
| `InpTP1_ATR` | 0.5 | TP1: close 50% at this ATR profit |
| `InpTP2_ATR` | 2.0 | TP2: close 25% at this ATR profit |
| `InpTrailActivATR` | 1.0 | Start trailing after this ATR profit |
| `InpTrailTightATR` | 1.0 | Tight trail multiplier (before TP2) |
| `InpTrailLooseATR` | 2.0 | Loose trail multiplier (after TP2) |
| `InpTP1_ATR` | 1.0 | TP1: close 50% at this ATR profit |
| `InpTP2_ATR` | 2.0 | TP2: close 50% of remaining at this ATR profit |
| `InpHardTP_ATR` | 5.0 | Hard TP on order as safety net (0 = disabled) |
| `InpTrailTightATR` | 1.0 | Tight trail multiplier (after TP1, before TP2) |
| `InpTrailLooseATR` | 1.5 | Loose trail multiplier (after TP2) |
| `InpTrailBuyATR` | 0 | Buy trail override (0 = use standard) |
| `InpTrailSellATR` | 0 | Sell trail override (0 = use standard) |
### Loss Reduction
| Parameter | Default | Description |
|-----------|---------|-------------|
| `InpUseScaledEntry` | true | Scaled entry: start 50%, add 50% on confirmation |
| `InpScaleInATR` | 0.3 | Add remaining 50% after this ATR profit |
| `InpUseTimeExit` | true | Time-based exit for stalled trades |
| `InpStallBars` | 8 | Close if stalled after this many bars |
| `InpStallMinATR` | 0.3 | Min ATR profit required within stall window |
### Indicators
| Parameter | Default | Description |
|-----------|---------|-------------|
@@ -102,8 +122,8 @@ Each trade risks **10% of account balance**. The SL is placed at **2.0× ATR** f
| Parameter | Default | Description |
|-----------|---------|-------------|
| `InpUseRSIFilter` | true | Enable/disable RSI confirmation |
| `InpRSIOversold` | 30.0 | RSI must be below this to allow BUY |
| `InpRSIOverbought` | 70.0 | RSI must be above this to allow SELL |
| `InpRSIOversold` | 35.0 | RSI must be below this to allow BUY |
| `InpRSIOverbought` | 65.0 | RSI must be above this to allow SELL |
### Execution
| Parameter | Default | Description |
@@ -125,7 +145,7 @@ Each trade risks **10% of account balance**. The SL is placed at **2.0× ATR** f
| Parameter | Default | Description |
|-----------|---------|-------------|
| `InpUseDailyLossLimit` | true | Enable daily loss stop |
| `InpMaxDailyLossPct` | 4.0 | Max daily loss % (stops trading for the day) |
| `InpMaxDailyLossPct` | 6.0 | Max daily loss % (stops trading for the day) |
| `InpUseWeeklyLossLimit` | true | Enable weekly loss stop |
| `InpMaxWeeklyLossPct` | 10.0 | Max weekly loss % (stops trading until next week) |
| `InpUseEquityStop` | true | Enable equity drawdown global stop |
@@ -135,7 +155,7 @@ Each trade risks **10% of account balance**. The SL is placed at **2.0× ATR** f
| Parameter | Default | Description |
|-----------|---------|-------------|
| `InpUseVolFilter` | true | Enable/disable volatility filter |
| `InpATRMaxMultiple` | 1.7 | Max ATR(14)/ATR(50) ratio (blocks spikes/near-breakouts) |
| `InpATRMaxMultiple` | 2.2 | Max ATR(14)/ATR(50) ratio (blocks spikes/near-breakouts) |
| `InpATRMinMultiple` | 0.5 | Min ATR(14)/ATR(50) ratio (blocks dead markets) |
## Installation
@@ -150,7 +170,7 @@ Each trade risks **10% of account balance**. The SL is placed at **2.0× ATR** f
The EA shows a real-time status overlay on the chart:
```
--- GOLD QUANT M5 SCALPER v7 ---
--- GOLD QUANT M5 SCALPER v8 ---
Z-Score: -1.45 | RSI: 28.3
ADX: 16.3
ATR: 4.82
@@ -158,12 +178,12 @@ Spread: 25.0 pts
News Block: no
Vol Filter: OK
Profit: 0.72 ATR | TP1 done (50% running, tight trail)
Day: -0.50% / -4.0% | Wk: -1.23% / -10.0% | DD: 0.80% / 15.0%
Day: -0.50% / -6.0% | Wk: -1.23% / -10.0% | DD: 0.80% / 15.0%
```
## In Short
The EA waits for a statistically extreme price move in a ranging market, confirmed by both Z-Score and RSI, during active London/NY hours, with clean spreads, normal volatility, and no news — then enters expecting a snap-back to the mean. It takes profit in three stages and has three layers of circuit breakers to protect capital during losing streaks.
The EA waits for a statistically extreme price move in a ranging market, confirmed by both Z-Score and RSI, during active London/NY hours, with clean spreads, normal volatility, and no news — then enters with a scaled 50% position expecting a snap-back to the mean. It adds the remaining 50% on confirmation, takes profit in three stages, cuts stalled trades early, and has three layers of circuit breakers to protect capital during losing streaks.
## Risk Warning