Mô tả
# The Midas Scalper: Institutional Gold (XAUUSD) Precision Strategy
Designed exclusively for the Spot Gold (XAUUSD) market on cTrader, **The Midas Strategy** is an institutional-grade, high-precision scalping algorithm. Engineered around the principle of capital preservation, the system operates as a selective mean-reversion engine. It identifies micro-dips and micro-peaks during controlled, range-bound market conditions, secures localized gains via an algorithmic profit-locking mechanism, and enforces strict risk controls through multi-layered volatility kill switches.
---
## Performance & Historical Backtest Benchmark
The strategy has undergone extensive historical stress-testing within cTrader using institutional replay tick data, including realistic random spread modeling and full commission simulation.
| Metric | Verified Benchmark Result |
| --- | --- |
| **Trading Symbol** | XAUUSD (Spot Gold) |
| **Chart Timeframe** | M1 (1-Minute) |
| **Testing Duration** | 1 Year, 3 Months, 21 Days (12/05/2025 – 02/09/2026) |
| **Starting Balance** | $10,000.00 USD |
| **Net Realized Profit** | +$2,846.58 USD |
| **Return on Investment (ROI)** | **+28.47%** |
| **Ending Equity / Balance** | $12,846.58 USD |
| **Simulated Spread** | Dynamic Random Spread (30 to 50 pips) |
| **Commission Deductions** | $30.00 per million USD volume |
| **Account Leverage** | 1:400 (Hedging Account Type) |
---
## Core Trading Philosophy & Execution Logic
### 1. Mean-Reversion Execution
The algorithm tracks real-time peak asks and trough bids. When price pulls back by the configured threshold from an extreme, it opens an entry:
* **Dip Buying (Long):** Triggers when the price drops by the `Buy Dip Threshold` from the tracked high.
* **Peak Selling (Short):** Triggers when the price rallies by the `Sell Rise Threshold` from the tracked low.
* **Slippage Bounded:** Orders are routed as `MarketRange` orders. If liquidity thins and fills cannot be obtained within the specified slippage tolerance, the order is rejected rather than entering at an unfavorable price.
### 2. Algorithmic Profit Lock
Rather than waiting passively for a standard Take Profit or trailing stop:
* Once a position achieves floating profit equal to the **Lock Trigger** (e.g., +3.5 pips), the broker-side Stop Loss is modified to the **Lock Level** (e.g., +2.0 pips).
* Winning trades are protected against sudden reversals while leaving room to capture the full Take Profit target (e.g., +10.0 pips).
### 3. Multi-Timeframe Trend Coherence Filter
To avoid buying into severe downward flushes or shorting runaway vertical rallies, the bot cross-examines up to four higher timeframes (M1, M5, M10, M15). If any enabled timeframe displays a directional momentum move exceeding the threshold, counter-trend entries are blocked until the move stabilizes.
### 4. Dynamic Trailing Lot Scaling
When enabled, position sizing scales as pure strategy profit accumulates. Sizing uses a step-function (+1 reference lot per defined profit threshold) and symmetrically descales if drawdowns occur, never dropping below your base lot.
### 5. State Persistence
The bot saves its realized profit, high-water mark, drawdown ceilings, and cooldown timers directly to cTrader's `LocalStorage`. If your VPS reboots or cTrader restarts, the bot picks up with its historical calculations and safety timers intact.
---
## Multi-Layer Risk & Capital Protection
```
[ Incoming Price Tick ]
│
┌────────────────────────────┴───────────────────────────┐
▼ ▼
[ Phase 0a: Hard Kill Switch ] [ Phase 0b: Floor Guard ]
Violent swing detected? Strategy equity below floor?
──> Liquidate ALL & rest 7 days ──> Block entries, trim worst loser
│
▼
[ Phase 0c: Profit Target Goal ]
Target reached?
──> Enter Wind-Down: harvest winners, allow floating trades to recover
│
▼
[ Phase 0d: Soft Danger Zone ]
Rapid localized swing?
──> Cut small losers (< closure cap), hold deep trades, trigger cooldown
│
▼
[ Phase 1 & 2: Entry Gates ]
Session active? Spread normal? News clear? Trend aligned?
──> Dispatch bounded MarketRange execution
```
* **Session Boundary Enforcement (`CloseAllOnSessionEnd`):** Restricts entries to calmer hours (e.g., Asian session). When the operational session window closes, open positions can be immediately liquidated to avoid holding exposure through volatile European and US liquidity crossovers.
* **Capital Floor Guard:** Protects your underlying deposit. If the combined floating and realized strategy P&L falls below your threshold, the bot suspends new trades and liquidates the worst-performing position tick-by-tick to stem losses.
* **Profit Goal & Wind-Down Protocol:** When the session profit goal is hit, new entries freeze immediately. The bot takes profits on winning positions and allows remaining open positions to work toward their individual targets before initiating a rest cycle.
* **Soft Danger Zone:** Detects rapid localized volatility spikes over short periods. It trims fresh positions before their losses compound, while leaving deeper trades intact to prevent panic-liquidations at temporary price extremes.
* **Hard Kill Switch:** Serves as the ultimate emergency stop. If a major economic shock causes an extreme price move within a designated window, all buy and sell positions are liquidated immediately, and the bot pauses trading for a multi-day cooling-off period.
---
## Recommended Trader Profile & Account Requirements
* **Minimum Recommended Capital:** $1,000 to $10,000 USD (or currency equivalent).
* **Recommended Leverage:** 1:100 to 1:500.
* **Broker Account Type:** Low-spread ECN / Raw Spread with fast execution and minimal slippage on XAUUSD.
* **Platform:** cTrader Desktop or Web (cBot automation enabled).
* **Hosting:** Low-latency Windows VPS located near your broker's trade servers (London LD4 or New York NY4 recommended).
---
## Tested Default Parameter Reference
Below are the default settings matching the verified 15-month benchmark:
### 1. General & Trailing Lot Scaling
| Parameter | Default Value | Description |
| --- | --- | --- |
| `Volume (Lots)` | `0.01` | Base position size per execution |
| `Enable Trailing Lot Scaling` | `true` | Enables dynamic position sizing based on pure profit |
| `Reference Capital ($ profit per step)` | `1000.0` | Net profit required to increase position size by one step |
| `Reference Lots (base size AND step size)` | `0.01` | Lot size added per profit step |
### 2. Buy & Sell Execution Settings
| Parameter | Buy Side | Sell Side | Description |
| --- | --- | --- | --- |
| `Enable Grid` | `true` | `true` | Toggles directional trade activation |
| `Take Profit (Pips)` | `10.0` | `10.0` | Hard broker-side take-profit target |
| `Stop Loss (Pips)` | `5.0` | `5.0` | Hard disaster stop loss placed at order fill |
| `Lock SL Trigger (Pips)` | `3.5` | `3.5` | Floating profit needed to trigger profit-locking |
| `Lock SL Level (Pips)` | `2.0` | `2.0` | Level where the Stop Loss is secured once triggered |
| `Dip / Rise Threshold (Pips)` | `10.0` | `10.0` | Required pullback distance to open a trade |
| `Max Positions` | `1` | `1` | Maximum concurrent open positions per direction |
### 3. Timing, Sessions & Trend Filters
| Parameter | Default Value | Description |
| --- | --- | --- |
| `Min Time Between Trades (Seconds)` | `0.0` | Minimum execution delay between consecutive trades |
| `Enable AsianSession (01:00-08:00 UTC)` | `true` | Focuses trading on calmer Asian trading hours |
| `Other Session Presets (Dead Zone, London, NY)` | `false` | Disabled to avoid high-volatility sessions |
| `Close All Positions When Session Ends` | `true` | Closes open exposure immediately when session ends |
| `Auto-Block NFP (First Friday Blackout)` | `true` | Suspends entries during US Non-Farm Payroll releases |
| `Check 1M / 5M / 10M / 15M Trend` | `true` (All) | Requires multi-timeframe trend alignment before entry |
| `Trend Lookback (Bars)` | `100` | Historical bar depth evaluated for trend checks |
| `Min Move To Count As Trend (Pips)` | `100.0` | Minimum price move required to define a trend |
### 4. Execution Guardrails & Profit Goals
| Parameter | Default Value | Description |
| --- | --- | --- |
| `Max Acceptable Slippage (Pips)` | `100.0` | Order rejection threshold for adverse price slippage |
| `Max Acceptable Spread (Pips)` | `100.0` | Maximum allowable spread before entries pause |
| `Profit Goal ($)` | `200.0` | Target profit per cycle before entering wind-down |
| `Auto-Resume After Goal` | `true` | Resets and restarts after reaching profit goal |
| `Rest Before Next Goal Leg (Hours)` | `0.0` | Resting pause following goal completion |
### 5. Multi-Tier Protective Kill Switches
| Parameter | Default Value | Description |
| --- | --- | --- |
| `Capital Floor - Min Total P&L ($)` | `-200.0` | Maximum strategy drawdown limit before defensive closure |
| `Min Loss Before Eligible (Pips)` | `1000.0` | Minimum loss required before floor guard trims a trade |
| `Reference Capital for Drawdown % ($)` | `1000.0` | Base capital used for strategy drawdown percentage checks |
| `Max Drawdown From Peak (%)` | `200.0` | High-water mark drawdown threshold |
| `Danger Zone Swing (Pips)` | `5000.0` | Localized swing threshold for soft volatility detection |
| `Danger Zone Window (Minutes)` | `40` | Lookback window for danger zone evaluation |
| `Max Acceptable Closure Loss (Pips)` | `100.0` | Maximum loss cut when danger zone is triggered |
| `Danger Zone Cooldown (Minutes)` | `120` | Cooling-off duration after danger zone triggers |
| `Hard Kill Switch Swing (Pips)` | `10000.0` | Extreme swing threshold for market-shock liquidation |
| `Hard Kill Switch Window (Minutes)` | `60` | Lookback period for hard stop calculation |
| `Rest Period After Hard Stop (Days)` | `7.0` | Cooling-off pause following a hard stop liquidation |
| `Override Hard Stop Rest` | `false` | Manual toggle to resume trading after a hard stop |
---
## Step-by-Step User Setup Guide
1. **Install the cBot:**
* Download the `.algo` file. Double-click it to automatically import it into **cTrader**, or open cTrader, navigate to the **Automate** tab, click **Add**, and select the file.
2. **Open the Chart:**
* Select the **XAUUSD** (Gold vs US Dollar) symbol.
* Set the chart period to **m1** (1-Minute chart).
3. **Attach the Strategy:**
* Drag **The Midas Strategy** from the cBots panel onto your active XAUUSD m1 chart.
4. **Configure Account & Parameters:**
* In the cBot parameters panel, load the default parameters listed above.
* If running a live balance of $10,000, ensure your `Volume (Lots)` matches your risk tolerance (0.01 lots per $1,000–$10,000 recommended).
* Confirm the **Session Filter** settings match your broker's UTC time.
5. **Start the Bot:**
* Click the green **Start** button in cTrader.
* Open the **Logs** tab to confirm initialization. You should see:
`PRO EXTENDED: Midas Initialized. Buy Grid: ENABLED. Sell Grid: ENABLED.`
6. **VPS Deployment:**
* Keep the cBot running continuously on a reliable, low-latency VPS to maintain consistent trade monitoring and profit-locking.
---
## Operational Limitations & Usage Guidelines
* **Trading Windows:** The Midas Strategy is optimized for range-bound market conditions. The default setup targets the Asian trading session (01:00 to 08:00 UTC), avoiding the heightened volatility of the London/New York overlap.
* **Macroeconomic Shocks:** Automated news protection monitors recurring events like the monthly NFP. However, during major geopolitical events, emergency rate announcements, or flash market flushes, pause the bot until price action normalizes.
* **Pip Denomination Notice:** Broker pip configurations for XAUUSD can vary. On most 2-decimal and 3-decimal gold feeds, 10 pips equals $1.00 of price movement. Confirm your broker's pip conventions in demo trading before deploying live capital.
