False Break Rate By Level Type
Traders argue about which kind of level is more reliable - yesterday's high/low, round numbers, or swing points - usually from memory rather than a count. This script builds all three level families from the same loaded history and applies one identical break-and-reversal test to each, so the comparison is apples to apples rather than three different studies run at different times on different data. A "break" only fires on a CLOSE past the level by a fixed pip threshold, following a bar whose close was still on the near side - a wick alone never counts. That matches how most traders actually judge whether a level broke: on the close, not on the extreme. A fixed number of bars later, the close is checked again - if it has reverted back through the level, that break is scored a false break; if it is still beyond the level (or further), it is a true break. Prior day levels are the daily high/low, tested once per day from the day's open forward. Round-number levels are an evenly spaced grid across the whole study range, each tested once. Swing points are confirmed fractals - a bar strictly higher (or lower) than a chosen number of bars on both sides - so only price extremes the market itself marked out are used, not every local wiggle. Each level family produces its own false-break percentage, and the three are ranked from worst to best in the final table. Notes and limitations - Each level - whether a prior day extreme, a grid level, or a swing point - is tested for its FIRST close-based break only within this study; a level is not retested repeatedly once it has produced one break event. - Break events that neither revert past the threshold nor hold past the threshold within the reaction window are excluded from the false/true percentages rather than forced into either bucket. - Swing fractals near the very start or end of the loaded history cannot be confirmed (not enough bars on one side) and are correctly excluded. - This is a descriptive study, not a trading signal. It does not account for spread or slippage, and small per-family sample sizes should be treated with appropriate scepticism before drawing conclusions.
Script · MT4 · v1.0 · Free
About False Break Rate By Level Type
False Break Rate By Level Type is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 10 settings, such as Symbol, Timeframe and Max bars. MQL source code included.
Files in the download: FalseBreakRateByLevel.mq4, FalseBreakRateByLevel.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Symbol | Symbol to study, blank = this chart's symbol | |
| Timeframe | PERIOD_H1 | Timeframe to study |
| Max bars | 6000 | Most recent bars to include |
| Max days | 200 | Most recent daily bars used for prior day levels |
| Round step pips | 50.0 | Spacing between round-number grid levels, in pips |
| Swing lookback | 5 | Bars on each side required to confirm a swing fractal |
| Break threshold pips | 8.0 | Close distance past the level required to call it "broken" |
| False break bars | 6 | Bars after the break checked for a reversal back through the level |
| Save csv | true | Write every break event to a CSV file |
| Delimiter | DelimiterComma | CSV column separator |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: Grid · Fractals · Alerts · MT4 Script · MQL4 Source Code