The standard fractal marks any bar with two lower highs on each side, and on a busy chart that means a great many of them. The advanced fractals indicator keeps that rule and adds one control the original never had: a minimum price distance from the last pivot of the same type.
This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Main price chart |
| Plots | 2: Fractal high, Fractal low |
| Alerts | popup, push notification, email, sound |
| Inputs | 17 |
Chart elements
Two arrow plots plus optional level lines.
`Fractal high` marks aqua using arrow code 217.
`Fractal low` marks magenta using arrow code 218.
`ShowLevels` draws lines at the latest pair.
Labels sit beside those lines as text.
`LevelWidth` `2` sets how heavy they draw.
- Fractal high: arrow, width 2, arrow code 217
- Fractal low: arrow, width 2, arrow code 218

How the numbers arrive
The pivot rule
`FractalBars` `2` bars either side must fail to beat the candidate. Two is the classic figure, and the comparison handles ties on the left differently from the right so a flat run yields one marker rather than several.
The spacing rule
`MinFractalPoints` `0.0` ships disabled. Give it a value and a new pivot must sit that far in points from the previous same-type pivot before it earns a marker.
Drawing the latest pair
`ShowLevels` keeps a line at the most recent high and low pivot. Those two prices are the ones a break-based approach would watch, which is why they get drawn rather than all of them.
On a live chart
Every marker confirms two bars after its pivot.
Aqua sits above a bar, magenta below it.
`ArrowOffsetPts` `25` keeps markers off the candles.
Only the newest pivot of each type gets a line.
A zero spacing setting marks every valid pivot.
`MaxBars` `1500` limits how far back it scans.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
A newly confirmed pivot is what reports. `EnableAlerts` decides whether it speaks and it shows in a popup window already. The phone, the mail route and the audio named by `SoundFile` all start closed, once per closed bar.
Every Advanced Fractals Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
FractalBars |
Bars on each side of the pivot (2 = classic). Bars either side defining a pivot, `2`. | 2 |
MinFractalPoints |
Minimum spacing to the previous same-type fractal (points, 0 = off). Minimum gap from the last same-type pivot, `0.0`. | 0.0 |
Display settings
| Setting | What it does | Default |
|---|---|---|
ShowLevels |
Draw the latest up / down fractal levels. Draw lines at the latest pair, `true`. | on |
LevelWidth |
Level line width. How heavy those lines draw, `2`. | 2 |
LabelFontSize |
Level label font size. | 9 |
ArrowOffsetPts |
Marker offset from the bar (points). Gap between a marker and its bar, `25`. | 25 |
UpFractalColor |
Fractal high marker colour. | aqua |
DnFractalColor |
Fractal low marker colour. | magenta |
UpLevelColor |
Latest fractal high level colour. | aqua |
DnLevelColor |
Latest fractal low level colour. | magenta |
Alert settings
| Setting | What it does | Default |
|---|---|---|
MaxBars |
History bars to scan (0 = all). History the scan covers, `1500`. | 1500 |
EnableAlerts |
Master alert switch. Whether a confirmed fractal speaks, `true`. | on |
EnablePopup |
Popup alert. It shows in a popup window, `true`. | on |
EnablePushNotify |
Push notification to mobile. It travels to a phone, `false`. | off |
EnableEmail |
Email alert. | off |
EnableSound |
Sound alert. | off |
SoundFile |
Sound file. The audio it triggers, `”alert.wav”`. | alert.wav |

Fitting it to a chart
Two bars either side is a small structure, so the spacing control matters most on fast charts. EURUSD H1 is the reference chart and gives a handful of pivots a day. M5 produces dozens. H4 leaves you the major turns only.
Where it falls down
A two-bar pivot marks plenty of insignificant turns.
Every marker confirms two bars after the fact.
Spacing ships at zero, so nothing gets filtered initially.
A pivot is a shape, not a reason for price to turn.
Copy the compiled Advanced Fractals Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.
Download the Advanced Fractals Indicator for MT4 and MT5
The zip holds the compiled Advanced Fractals Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.
Download this indicator free
Enter your email and the file is yours. You also get the full MT4 and MT5 library.
FAQ
What does MinFractalPoints 0.0 mean in practice?
The spacing filter is off, so every valid pivot earns a marker. Setting it to a positive figure makes a new pivot prove it sits far enough from the last one of its kind before anything is drawn.
Why does Fractal high use arrow code 217?
It is the small chevron rather than the solid triangle used for signal arrows elsewhere. Keeping a different shape makes pivots easy to separate visually from buy and sell marks if you run both.
How many bars late does FractalBars 2 confirm?
Two. The rule needs two bars on each side, so a pivot cannot be drawn until the pair to its right has closed, however obvious the turn looked when it happened.
Which levels does ShowLevels draw?
The most recent confirmed high pivot and the most recent low one, and nothing older. That keeps two lines on the chart instead of a stack, and those two are the prices a break approach would be watching.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Advanced Fractals Indicator as one input. Always backtest before trading live.
Authoritative references
- Learn more about technical indicators.
