AI Previous Day Range Trader
- Experts
- 버전: 1.0
AI Previous Day Range Trader — Automated Previous-Day High/Low Breakout EA for MT5
AI Previous Day Range Trader is a fully automated Expert Advisor that trades breakouts of the previous trading day's high and low. Every session, the EA maps out yesterday's daily range and waits for price to break decisively above the high or below the low during a configurable trading window, entering in the direction of the breakout with a fixed stop loss and take profit.
The system is designed to be simple, transparent and safe: it takes at most one trade per symbol per day, uses a hard stop loss on every position, and never uses grid, martingale or any form of position averaging.
Key Features
- Automatic detection of the previous day's high and low (D1 shift-1), recalculated fresh at the start of every trading day
- Configurable time window (hour offset) that defines when breakout entries are allowed
- One trade per symbol per day — no overtrading, no revenge trading
- Fixed Stop Loss and Take Profit on every trade, calculated in points
- Built-in margin check before every order using OrderCalcMargin, with automatic lot normalization to the broker's minimum/maximum/step
- New-bar signal gate so the entry condition is evaluated once per bar, not on every tick
- No Grid, no Martingale, no averaging — every position is closed strictly by its own Stop Loss or Take Profit
- Works on any MetaTrader 5 broker and account type
Recommended Use
- Timeframe: M15 or M30 for signal detection (the previous-day range itself is calculated from D1 data)
- Best suited to liquid Forex majors and Gold (XAUUSD), which tend to show clean daily range breakouts
- Use a broker with tight spreads and low latency for best fill quality on breakout entries
- Test on a demo account first and adjust the trading window and SL/TP points to match the symbol's typical daily range
Main Inputs
- Trading Window Start / End (hour offset) — controls when breakout entries are allowed
- Stop Loss (points) and Take Profit (points)
- Lot Size — fixed lot, automatically validated against broker margin requirements
- Magic Number — unique identifier so the EA only manages its own trades
This EA does not guarantee profits. Past performance and backtest results are not indicative of future results. Please test thoroughly on a demo account before using on a live account, and always use proper risk management.
