simulate_grid_martingale_survival
Run a deterministic 1-to-12 step Grid / Martingale drawdown survival simulation for Gold (XAUUSD) or FX pairs. Computes cumulative open lots, required margin at each grid level, floating drawdown in USD, and the exact adverse price movement in pips before triggering a 20% vs 0% broker margin stop-out.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | No | Trading symbol for pip value and contract specification (e.g., "XAUUSD", "EURUSD", "USDJPY"). Defaults to "XAUUSD". | XAUUSD |
| initialLot | No | Initial Step-1 trade size in standard lots (minimum 0.01). Defaults to 0.01. | |
| gridStepPips | No | Fixed distance in pips between consecutive grid entries. Defaults to 25. | |
| lotMultiplier | No | Martingale lot multiplier applied at each subsequent grid step (e.g., 1.5x or 2.0x). Defaults to 1.5. | |
| accountBalanceUsd | No | Starting account balance in USD to test against multi-level grid drawdown. Defaults to 1000. |