AP Inside-Bar Breakout MT5
AP Inside-Bar Breakout MT5
A clean, breakout robot that trades the classic Inside-Bar pattern with stop orders.
No DLLs. No web calls. One EX5. Spread/margin guards. SL/TP are applied after fill (so you won’t see “invalid stops” during placement). Optional freeze-aware cancel of the opposite pending.
What it does
Detects an Inside Bar on your chosen Signal TF (default M15): bar[1] is inside bar[2] (mother bar).
Arms two stop orders at the mother-bar high/low plus a configurable buffer.
After a stop is triggered, the EA applies SL/TP to the opened position using the planned levels (mother bar range × R), clamped beyond broker StopsLevel + FreezeLevel to avoid invalid-stop errors.
(Optional) Cancels the opposite pending once a position is open—freeze-safe (skips cancel when price is inside the freeze band).
Why traders like it
Pure price action: simple, transparent logic you can explain in one minute.
Quiet & disciplined: one setup per inside-bar signal, spread cap, no order bursts.
Key features
Inside-Bar detection on a configurable timeframe.
Entry buffer (points) to avoid micro-whips.
R-based TP and optional extra SL padding beyond the mother bar.
Fixed-lot mode (defaults to broker min for easy validation).
Spread guard and margin gate (pending + trigger).
Magic isolation—plays nicely with other EAs/manual trades.
Clean journal logs with tag.
Inputs (short)
InpSignalTF – Signal timeframe (e.g., M15/H1).
InpBufferPts – Entry buffer in points (typical 20–50 on majors).
InpTP_R_Mult – Take-profit in R (1.0–2.0 common).
InpSLExtraPts – Extra SL points beyond the mother bar (0–30 typical).
InpUseFixedLots / InpFixedLots – Position sizing.
InpMaxSpreadPts – Max spread in points.
InpCancelOppOnFill – Cancel the opposite pending after fill.
InpMagic / InpComment / InpLogLevel – Housekeeping.
Quick start
Attach to the chart you want to trade.
Suggested first run: EURUSD M15, Buffer=30 , TP_R=1.5 , SL extra=0 , FixedLots=0.10 , Spread cap=300 .
For screenshots/backtests: enable visual mode to show pendings, then watch SL/TP appear right after a trigger.
Tips
Higher TFs (M30–H1) reduce noise; lower TFs give more signals.
Wider instruments (e.g., XAUUSD) may need a larger BufferPts and Spread cap.
If your broker has tight Stops/Freeze levels, keep SL/TP post-fill (default) and let the EA clamp levels automatically.
What’s under the hood (safety)
No SL/TP on pending placement → avoids invalid stops.
Post-fill PositionModify with levels clamped beyond StopsLevel + FreezeLevel + pad .
Freeze-aware cancel: opposite pending is removed only if it’s outside the freeze band.
One signal per new bar on the Signal TF → no per-tick spam.
No DLLs, no external calls, single EX5.
Disclaimer
Trading involves risk. Backtests and visuals are for education, not guarantees. Use appropriate risk management.
A clean, breakout robot that trades the classic Inside-Bar pattern with stop orders. No DLLs. No web calls. One EX5. Spread/margin guards. SL/TP are applied after fill (so you won’t see “invalid stops” during placement). Optional freeze-aware cancel of the opposite pending.