AP InsideBar Breakout
- Experts
- Allan Graham Pike
- Version: 1.4
- Activations: 5
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.
-
Validator-friendly engine: pending placement without SL/TP, post-fill modify, freeze-aware cancels, one signal per bar, magic isolation.
-
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 (validator-safe defaults).
-
InpMaxSpreadPts – Max spread in points.
-
InpCancelOppOnFill – Cancel the opposite pending after fill (OFF by default for validator).
-
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 .
-
Leave CancelOppOnFill = false for Market validation; you can enable it live.
-
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.
FAQ
Q: I don’t see SL/TP when a pending is placed.
A: That’s by design. SL/TP are applied immediately after the position opens to keep validator and broker rules happy.
Q: Why didn’t it cancel the opposite pending?
A: If price sits in the broker’s freeze zone, the EA skips the cancel to avoid errors. It will remove it later once price moves out (or when the session conditions change).
Q: Lots are small.
A: Defaults are validator-safe. Increase InpFixedLots responsibly on live accounts.
Disclaimer
Trading involves risk. Backtests and visuals are for education, not guarantees. Use appropriate risk management.
AP Inside-Bar Breakout — simple price-action logic, professional execution. Attach, set your buffer & R, and let it manage the rest.