Break And Retest Trader
- Experts
- Versione: 2.0
- Attivazioni: 10
Break And Retest Trader is an automated Expert Advisor for MetaTrader 5.
IMPORTANT RISK NOTICE
Trading leveraged products is risky. This EA uses a stop loss on its trades, but a stop loss can be skipped by gaps and slippage. Past or simulated results do not guarantee future results. Test on a demo account first and only risk money you can afford to lose.
How it works
- Level: a cluster of H1 swing highs or lows touched at least a set number of times.
- Break: an H1 candle closes beyond the level (a two-of-three vote between level, swing and Asian range can be used, with the H4 EMA 200 trend as a filter).
- Retest: within a number of H1 bars price returns to the level zone. A deep close back through the level cancels the setup.
- Trigger: an M15 candle in the zone closes back in the break direction, then a market order is sent. Up to three orders with equal lots; each add must be better than the previous entry.
- One shared stop loss behind the level and one shared take profit (risk-reward from the first entry); the whole basket is closed after a maximum number of hours.
- Lots are sized so that the whole set hitting the stop loses at most the risk percentage. Filters: ATR regime, GMT hours, spread, NFP, Friday cut-off, rollover, daily loss and drawdown pause.
Safety and broker compatibility
- Volume is normalized to the symbol minimum, maximum and step before every order.
- Free margin is checked with OrderCalcMargin before an order is sent.
- Stops level and freeze level are respected when placing or modifying orders and SL/TP; a modification is not sent when the values are unchanged and nothing is modified inside the freeze zone.
- Symbol trade mode, trading session, order limit and filling mode are checked before sending requests.
- No DLL, no web requests, no files are written.
BOTKRIT recovery core and dashboard
This build includes a basket recovery core and a standard BOTKRIT panel. When the open basket of this EA loses more than the set percentage of the balance the EA pauses its own new entries and the core can open balancing (hedge) trades with its own magic number until the basket can be closed at break-even plus a target; the basket is cut at the set loss percentage. Balancing trades can increase exposure. The core works on hedging accounts only and can be switched off with InpRKOn = false. The panel can be collapsed and moved to another corner.
Inputs
- InpRiskPct (default 0.5): Risk pct
- InpMaxLot (default 1.0): Max lot
- InpServerGMT (default 2): Server gmt
- InpServerDST (default true): Server dst
- InpAutoGMT (default true): Auto gmt
- InpMagic (default 786600): Magic
- InpLevelTF (default PERIOD_H1): Level tf
- InpTrigTF (default PERIOD_M15): Trig tf
- InpBiasTF (default PERIOD_H4): Bias tf
- InpAutoHours (default true): Auto hours
- InpNFPBeforeMin (default 60): Nfpbefore min
- InpNFPAfterMin (default 60): Nfpafter min
- InpFridayCutGMT (default 18): Friday cut gmt
- InpRollBeforeMin (default 20): Roll before min
- InpRollAfterMin (default 30): Roll after min
- InpDailyLossPct (default 3.0): Daily loss pct
- InpMaxDDPct (default 15.0): Max ddpct
- InpDDPauseDays (default 3): Ddpause days
- InpMinLotRiskX (default 2.0): Min lot risk x
Recovery core and dashboard inputs:
- InpRKOn (default true): Recovery core on/off: when the basket loss grows, new entries of the EA are paused and balancing trades can be opened until the basket closes
- InpRKStartPct (default 3.0): Start recovery when the basket loss exceeds this percent of the balance at basket start
- InpRKStartATR (default 3.0): or when price runs against the net position by this many ATR (0 = off)
- InpRKCutPct (default 30.0): Close the whole basket at this percent loss of the start balance
- InpRKShockATR (default 10.0): Shock distance to survive (ATR multiples), used for the lot ceiling
- InpRKMinMargin (default 300.0): Do not open a recovery trade if the margin level after opening would be below this percent
- InpRKSpreadMul (default 2.0): Pause recovery trades when the spread is above this multiple of the 60-minute median
- InpRKCorner (default bottom right): Corner of the BOTKRIT panel
- InpRKBar0 (default FULL): Bar-0 label (basket profit, spread and leverage)
Recommended setup
- Major pairs and gold on M15 with H1 levels.
- Minimum capital: A balance of 1,000 USD or more with the default 0.5 percent risk.
- Test on a demo account first and keep the lot small.
