MethodKit Narrow Range Breakout
- Experts
- Versione: 1.0
- Attivazioni: 5
MethodKit Narrow Range Breakout
This Expert Advisor implements a well-known, public trading method and is offered for reference. It does not promise profit. Trading decisions and risk are yours. Past results do not guarantee future results. It is sold as a one-off tool, with no individual advice, signals, or set-up service. It is not an official product of, and is not endorsed or licensed by, any third-party author or rights holder.
Short description
Opens once a day when price leaves today's open by a stretch measured from recent days, after a narrow-range day, with the stop at the opposite stretch, and goes flat at day end.
Breakout (narrow-range day, then open plus or minus a stretch). Default stop and exit: the method's own level = the opposite stretch from today's open (fallback ATR x 2). No take profit by default. Flat at day end.
Designed around USDJPY, EURUSD and XAUUSD on M15 or H1. It can be attached to any symbol and timeframe the broker offers. These are the conditions the method is built around, not a performance claim.
How it works
This is a reference implementation of a publicly described opening-range method. By default it uses the broker's daily open (server midnight). You can switch the open source to a session open in London, New York, Tokyo, UTC or server time, at a set minute. If the previous completed day had the narrowest high-low range of the last 7 days (the lookback is an input), the EA waits for price to move a 'stretch' beyond today's open. The stretch is the average, over a set number of prior days (default 10), of the smaller of (high minus open) and (open minus low). A buy is taken when the bid clears open plus stretch; a sell when the ask clears open minus stretch. Only one trade is opened per day. The stop is placed at the opposite stretch (open minus stretch for a buy, open plus stretch for a sell). Positions are closed at 23:45 server time, or when a new day or session starts. An optional inside-day filter and an optional prior-day direction filter are off by default. A stop loss is always attached. There is no grid, averaging down, or martingale. It is not an official product of, and is not endorsed or licensed by, any third-party author or rights holder.
Shared risk controls
A stop loss is always attached. Lot size is a fixed lot or a percentage of equity at risk (hard cap 5 percent), plus a maximum-lot cap. Maximum open positions (default 1). A daily loss stop (default 3 percent of the day-start balance). A spread filter, a magic number, and broker GMT offset and DST inputs. No grid, no averaging down, no martingale.
Method inputs
- Narrow-range lookback (days) (InpNRLookback), default 7: The previous day must have the narrowest range of this many days.
- Also require an inside day (InpNRUseInside), default false: If true, the narrow-range day must also sit inside the day before it.
- Days used to average the stretch (InpNRStretchDays), default 10: Number of prior days in the stretch average.
- Open source (InpNROpenSrc), default Broker daily open: Broker daily open, or a session open in a time zone.
- Session zone (InpNRZone), default London: Used only in session-open mode.
- Session open (minutes from midnight in the zone) (InpNROpenMin), default 0: Used only in session-open mode.
- No new entries after this minute of the day (InpNREndMin), default 1320 (22:00): Measured on the server clock in broker-open mode, or in the session zone in session-open mode.
- Only with the prior day's close vs its open (InpNRTrendFilter), default false: Optional direction filter; off by default.
The common inputs (lot mode, fixed lot, risk percent, maximum lot, stop-loss mode, maximum positions, daily loss stop, spread filters, magic number, broker time, and the others listed in the user manual) are the same as in the other MethodKit EAs.
Important
This software does not predict markets and is not investment advice.
Trading leveraged products (FX, CFDs and similar) carries a high risk of loss. You can lose more than you expect, including, in some cases, more than your deposit.
That includes backtests and any forward or demo results.
Please test in the Strategy Tester and on a demo account, and confirm the broker's GMT offset, before any live use. Support is limited to installation questions and bug fixes.
Nothing in this description is a solicitation to buy or sell any financial instrument.
Installation
Copy the compiled .ex5 file into the MQL5/Experts folder, attach it to a chart, set the broker GMT offset, and allow algorithmic trading. Test it in the Strategy Tester and on a demo account first. See the user manual for the full input list.
