Timestamp an MT5 fractal when it becomes observable

Timestamp an MT5 fractal when it becomes observable

Number the bars from left to right

Use the simple five-bar upper pattern with strictly distinct highs: 8, 10, 13, 11 and 9. The middle bar has two lower highs on each side. The chart can draw an arrow over that middle candle, but a person standing at its close has seen only the two bars on the left.

Watch the fifth candle

Before the fifth candle closes, its high might still rise above 13. Replacing its final high of 9 with 14 invalidates the example. For a closed-bar rule, the first observation you can record is after the fifth bar completes. On a tick-driven chart that is ordinarily detected on the first tick of the following bar.

8 < 13   ·   10 < 13   ·   13 > 11   ·   13 > 9

Store two timestamps

Put the centre candle time in a pivot column and the completion time of the second right-hand bar in a confirmation column. If your code runs on the next tick, store the actual observation time as well. Matching an arrow's x-coordinate validates where you draw it, not when the program could have used it.

Test one failure case

Repeat the exercise with lows of 12, 10, 7, 9 and 11 for a lower fractal, reversing the comparisons so the centre low must be below its neighbours on both sides. Use distinct values for the timing test. Investigate equal highs or lows separately against the specific implementation instead of silently assuming your strict five-bar worksheet describes every tie.

Sources and further reading

Back to top

MQLume Bespoke

Built around your ambition.

Explore bespoke services →

Have something more specific in mind?

Ask us about advanced custom development. Share your requirements through private support or email; we will discuss the scope and quote separately.

100% committed to following up on your delivery and support requests.

Free downloads. Real source files.

FREE

Lizard [MQLume]

MQL5 / MT5Version v2.21

Free editable gold breakout project with six independently selectable cores, session filters and flexible position sizing.

US$149.00FREE
FREE

Scraper Gold [MQLume]

MQL5 / MT5Version v3.80

Free editable source with compiled EX5: four gold breakout engines with independent profiles, sizing, direction and exits.

US$95.00FREE
FREE

EA Black Dragon [MQLume]

MQL5 / MT5Version v13.0

Trend-based entries with optional grid additions, side controls and virtual exits.

US$30.00FREE
FREE

Hamster Scalping [MQLume]

MQL5 / MT5Version v21.0

RSI entries with two ATR filters, configurable sessions and optional grid management.

US$30.00FREE
MQLume

More to explore. A community to share it with.

Stay close to MQLume, wherever you like to learn.

YouTube

See our EAs in action. Explore backtests, walkthroughs and practical guides.

Watch on YouTube

Telegram

Meet other EA users, share ideas and keep up with what’s new.

Join the community Follow official updates

Cart

One personal-use licence per project. Each project can be added once.

Your cart is waiting for its first passenger.

Choose an EA or source edition to get started.

Continue shopping