Watch how to download trading robots for free
Find us on Twitter!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Indicators

Non-Repainting Fair Value Gap Detector - indicator for MetaTrader 5

Views:
105
Rating:
(1)
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
Gap lifecycle: an open gap extends to the right, TRIM settles the rectangle at the first closed bar that entered the gap, and DIM keeps its length and greys it.

Non-repainting three-bar Fair Value Gap detector for MetaTrader 5. It draws every three-bar imbalance as a rectangle, marks the 50% Consequent Encroachment level, and, in TRIM mode, settles the rectangle on the first closed bar that trades into the gap.

Detection is closed-bar only. A gap is derived from three closed bars - the bar before the impulse, the impulse bar itself, and the bar that leaves the imbalance behind - and the stored price levels are never rewritten afterwards. The gap lifecycle is an explicit state machine, so that in TRIM mode a gap that was filled long ago is drawn back to the bar that filled it instead of protruding into the future as though it were still open. Incremental scanning means only the bars that have just closed are tested, so a long history is not rebuilt on every tick.

Mitigation presentation is selectable: TRIM shortens the rectangle to the mitigation bar, DELETE removes it, DIM greys it, and NONE leaves it at full length. A built-in self-audit re-derives the gaps from the closed-bar series when the indicator is attached and compares the stored levels against the fresh ones, reporting the number of bars re-checked and any level that no longer matches. The audit runs on attach, and again whenever the chart history is rebuilt; set InpAuditDepth to 0 to switch it off.

Inputs, all documented in the source: InpLookbackBars (bars scanned on attach), InpMinGapPoints (0 = auto), InpMitigationMode, InpShowBullish, InpShowBearish, InpShowCE, InpExtendBars (forward extension of open gaps), InpAlertTouch, InpAuditDepth (0 = off) and eight colour inputs.

Pure native MQL5. No DLLs, no external dependencies, no include files.

Gap lifecycle: an open gap extends to the right, TRIM settles the rectangle at the first closed bar that entered the gap, and DIM keeps its length and greys it.

Session Range Breakout: Asia, London and New York high/low levels Session Range Breakout: Asia, London and New York high/low levels

Session Range Breakout draws the high and low of up to three intraday sessions (Asia, London and New York by default) and extends each level to the right with optional H/L labels and a range rectangle. Session hours, names and colours are configurable in server time. Optional popup, sound and push alerts fire when a bar closes outside a session range. The levels are fixed once the session closes, so the drawing does not repaint. The indicator draws chart objects only and never opens trades.

TesterStats: Strategy Tester report statistics in MQL5 code TesterStats: Strategy Tester report statistics in MQL5 code

Calculates the Strategy Tester report statistics from the deal history, including Z-Score, AHPR, GHPR, LR Correlation and LR Standard Error, which TesterStatistics() does not return. Checked value by value against the tester.

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

MACD Signals MACD Signals

Indicator edition for new platform.