Watch how to download trading robots for free
Find us on Telegram!
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

Five Point Retest - indicator for MetaTrader 5

Bruno Nunes Myrrha Ribeiro
Bruno Nunes Myrrha Ribeiro
🆓 FREE SOURCE CODE
-
🤖 EXPERT ADVISORS
► Awesome Oscillator Pullback EA for EURUSD:
https://www.mql5.com/en/code/78891
► Stochastic Daily Breakout for Gold:
Views:
27
Rating:
(1)
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

A breakout that pulls back, makes a new high and then returns to the same price twice is a structure many traders look for by eye. Finding it is slow, and nobody keeps track of how often it actually paid. This indicator finds the five-point structure on closed bars, draws it as a numbered path, turns each one into a plan with a retest band, a target and a fail level, and follows every plan to its end. A panel then answers the question that matters before you take the next one: on this chart, how many of these structures reached their target?

XAUUSD H1: a bearish retest that reached point 3

From structure to plan

Each structure is drawn as a thick path through its swings, with the points numbered 1 to 5 in large bold type just outside the candles. From the bar that confirmed the last point, a plan goes forward: a shaded retest band between the prices of points 4 and 5, a target line at the price of point 3, and a fail level on the other side of the band. On the newest plan of each side the lines carry their names on the chart, "target = point 3", "fail level" and "retest band 4-5", and a short legend in the top left corner explains the numbers, the fail level and the marks, so the chart reads on its own.

An open plan runs 10 bars past the last candle and ends in a label such as open: 1.8 ATR to target, 0.6 to fail. Both distances are measured from the current price in units of a 200-bar average true range, so they read the same on gold, a currency pair or an index.

A plan with an ending

A plan ends at the first bar that touches the target, or at the first close beyond the fail level; a wick through the fail level is not enough. If one bar does both, the plan counts as failed, so the score errs on the cautious side. A finished plan stops on the bar that resolved it, its path and lines turn lighter, and a large check mark or cross on that bar tells the outcome, named "target reached" or "failed" on the newest plan. Hover over any band or line to see whether that plan reached the target or failed, and after how many bars.

Hit rate on the chart

Two lines in a corner of the chart keep the score, for example Bullish: 7 of 11 reached point 3 (64%), and the same for the bearish side. Every plan that finished on the chart is counted. A plan that was replaced by a newer structure before it finished is left out, so the rate is never padded by plans that had no chance to end. The number changes from symbol to symbol and from timeframe to timeframe, and that is the point: you learn where the structure has worked before you trade it.

The five points

Two swing sizes are tracked: swings confirmed by 5 bars and inner swings confirmed by 2 bars, both inputs. The bullish version begins with a swing high A and a swing low B that set the first range. Point 1 is a high that breaks above A, point 2 a low back inside the A to B range, point 3 a high above point 1, and point 4 a low back inside the range. Point 5 is a low equal to point 4 within 0.5 ATR, or, with the other rule, any low inside the range; a third choice ends the structure at point 4. An option makes the structure stricter by asking point 4 to dip below point 2 while staying above B. The bearish version is the mirror image.

The search runs on every new inner swing and on every new swing, so structures built from the smaller waves are found as well as the larger ones. A new structure is accepted only when its A is newer than the A of the last structure found.

No stacked structures

Overlapping structures turn a chart into a tangle of paths and boxes. When a new structure starts before an older plan has ended and shares prices with it, the new one takes its place and the old one leaves the chart, so each price area shows one structure and one plan at a time.

Live bars and copies

Swings form on closed bars only, and a structure appears when its last swing is confirmed, a few bars after the price that formed it. The bar in progress cannot create a swing, but it can reach a target or a fail level; the plan is then shown as finished and opens again if the close does not confirm it. The equal rule for point 5 needs 200 bars of history for its ATR. Object names carry a code built from the swing size, the inner size and the point 5 rule, so two copies with different settings can share one chart.

Inputs

  • Structure: bars that confirm a swing (5); bars that confirm an inner swing (2); point 4 must pass point 2 (off); point 5 rule: off, inside the range or equal (equal); equal tolerance in ATR(200) (0.5).
  • Look: plan (on); hit rate panel (on); colors of bullish and bearish structures.

Inputs window: nine settings in two groups

Works on any symbol and timeframe, and removing the indicator deletes everything it drew.

Educational content, not financial advice. Trading involves risk of loss.

Envelopes Channel with 3-Color Trend Candles Envelopes Channel with 3-Color Trend Candles

Конверты скользящих с раскраской свечей для mt5

Breaker Block Retest Zones Breaker Block Retest Zones

Breaker block indicator for Gold (XAUUSD) and any symbol on MT5. Finds order blocks on closed bars, keeps them hidden and draws only the ones price closed through, with waiting, retested and failed states and alerts on the flip and on the first retest. Open source code.

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.