Loading…

Round Level Break System

Round numbers attract resting orders, so the naive version of this idea - buy the instant price ticks past 1.2000 - gets chopped up by the crowd sitting right there. This system instead watches every crossing of its price grid as an "excursion": it tracks how far price travels past the level before snapping back, and records that peak penetration distance once the excursion reverses. Over time this builds a live sample of how far a FAILED breakout typically goes on this exact symbol and timeframe. Once enough samples exist (InpMinSamples), a new excursion is only traded once its own penetration exceeds the mean plus a configurable multiple of the sample standard deviation - in other words, once it has already gone further than most failed attempts do. The stop-loss is placed back through the level by the same statistic (floored by InpStopFloorPips so a near-empty sample history never produces a stop close enough to be clipped by noise), and the target is a fixed multiple of that stop distance. Position size is computed from account equity, the configured risk percent, and the symbol's live MODE_TICKVALUE/MODE_TICKSIZE - never a hardcoded pip value or contract size - then normalised to the broker's lot step and clamped to its min/max lot. Notes and limitations The penetration statistic is built live from this chart only - it starts empty on every attach and is not persisted across restarts or bootstrapped from history, so a freshly attached chart trades conservatively (not at all) until it has observed enough real excursions. Only one round level is tracked at a time (the most recently crossed one); the system does not watch multiple grid levels simultaneously. No trade management after entry: the initial stop and target are fixed at send time. A trader wanting breakeven or trailing behaviour should pair this with a separate management EA (using a different magic number filter, or the same InpMagic if intended to manage these exact trades). Statistics reset to empty on every EA restart or symbol/timeframe change; they do not survive a terminal restart.

Expert advisor · MT4 · v1.0 · Free

About Round Level Break System

Round Level Break System is an expert advisor (trading robot) for MetaTrader 4. It opens a grid of orders at fixed price steps, can size trades from your balance and risk percent and trades breakouts. It has 11 settings, such as Round step pips, Min samples and Max samples stored. MQL source code included.

Files in the download: RoundLevelBreakSystem.ex4, RoundLevelBreakSystem.mq4, RoundLevelBreakSystem.txt.

Trading robots can lose money. Check every setting and test on a demo account before using real funds.

Settings

SettingDefaultWhat it does
Round step pips50.0Grid spacing between round levels, in pips
Min samples5Minimum recorded penetration samples before live entries are allowed
Max samples stored60Circular buffer size for penetration samples
Confirm sigma1.0Entry requires excursion beyond (mean + this many stdev) of past penetrations
Stop buffer sigma0.5Stop-loss placed this many stdev back through the level, beyond a floor pad
Stop floor pips3.0Minimum stop buffer beyond the level regardless of statistics, in pips
Reward multiple2.0Target distance as a multiple of the stop distance
Risk percent1.0Percent of account equity risked per trade
Max spread pips3.0Skip new entries when spread exceeds this many pips
Slippage points30Maximum acceptable slippage on OrderSend, in points
Magic37400Magic number for this EA's own orders

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Experts.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
  6. Test it first on a demo account or in the Strategy Tester.

Download the PDF guide

Tags: Grid · Breakout · Risk & Lot Size · MT4 Expert Advisor · MQL4 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria