DataTraderH4Breakout
This EA implements a New York session open breakout strategy that forms a range during the first 4 hours of NY local time (00:00-04:00 NY) and enters trades on M5 when price breaks above resistance or below support. Stop loss is placed at the lowest low or highest high of the preceding candles within the range, with take profit set at 2x the stop loss distance. It includes DST-aware time conversion between server time and New York time.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
Why this EA never traded: no entry rule survived the conversion.
Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.
Blow-up risk: No blow-up pattern found
None of the usual blow-up patterns were found in the code, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.
High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →
Strategy analysis
This is a classic session breakout strategy that identifies a price range during the first 4 hours of New York local time and trades breakouts from that range. Entry conditions: a buy signal triggers when the M5 close crosses above the range bottom from below, and a sell signal triggers when the M5 close crosses below the range top from above. Exit conditions use fixed stop loss and take profit, where the SL is placed at the lowest low (for buys) or highest high (for sells) found by scanning up to 15 preceding M5 candles within the range, and TP is set at 2x the SL distance for a 1:2 risk-reward ratio. Position sizing uses a fixed lot size with validation via CheckVolumeValue which checks min/max volume, volume step alignment, and sufficient free margin. Money management is minimal — there is no dynamic position sizing or percentage-based risk calculation. The EA only opens one position at a time and resets the range daily at the start of each NY session.
Strengths
- Clear and logical strategy based on the well-validated NY session breakout concept
- Comprehensive DST conversion logic ensures accurate time window calculation
- Defined stop loss and take profit rules with a fixed 1:2 risk-reward ratio
- Validates lot size against min/max/step and checks free margin before placing orders
- Daily range reset prevents stale data from affecting trading decisions
Weaknesses
- Fixed lot sizing with no dynamic position management — cannot scale risk based on account equity
- Stop loss search is limited to 15 candles, which may miss appropriate SL levels in volatile conditions
- No spread or slippage filter, potentially leading to unfavorable fills during low-liquidity periods
- Server DST switching uses hardcoded month/day instead of actual DST rules, risking time window misalignment
- No max drawdown protection or daily loss limit, creating unbounded risk during losing streaks
Possible improvements
- Add dynamic position sizing based on account equity percentage instead of fixed lots
- Implement spread filtering and maximum slippage limits to avoid trading during high-spread periods
- Add daily max loss limits and position reduction after consecutive losses for better capital preservation
Risk assessment
Overall risk: Medium
- Fixed lot size without risk percentage control may over-leverage small accounts
- Hardcoded DST switching dates may not match actual broker settings, causing time window drift
- No daily loss cap or drawdown protection mechanism
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
ServerGMTOffsetWinter | 2 | Server winter GMT offset (hours) |
ServerGMTOffsetSummer | 3 | Server summer GMT offset (hours) |
ServerSwitchToSummerMonth | 3 | Month to switch to summer time |
ServerSwitchToSummerDay | 1 | Day to switch to summer time |
ServerSwitchToWinterMonth | 11 | Month to switch to winter time |
ServerSwitchToWinterDay | 1 | Day to switch to winter time |
Lots | 0.1 | Trading lot size |
Similar Breakout EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.