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

ATS Confirmed Swings - non-repainting swing highs and lows - indicator for MetaTrader 5

Andrea Michelon
Andrea Michelon
  • MQL5 Developer / Trading Systems at  Indicator and EA developer
  • Italy
  • 2190
5 (3)
Andrea (Andy), Italy. Self-taught programmer since the 1990s, now building MetaTrader 5 tools under the name Andy Trading Solutions (ATS).
| English Русский 中文 Español Deutsch 日本語 Português 한국어 Français Italiano Türkçe
Views:
1184
Rating:
(3)
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

This indicator marks swing highs and swing lows on the chart, and it never repaints. A swing is drawn only after the bars that confirm it have closed, so what you see today is exactly what the chart will still show tomorrow.

How it works

A bar is a swing high when its high is above the highs of the N bars on its left and not below the highs of the N bars on its right. Swing lows use the same logic, mirrored. The bar that is still forming is never used, and a swing is drawn only when all N confirming bars on its right have closed.

Nothing is drawn early and nothing is removed later. This makes the swings safe as a building block for BOS / CHoCH logic and for backtests. The cost of this honesty is a lag of N bars: that lag is unavoidable for any swing that cannot repaint.

Inputs

InpStrength - number of bars on each side used to confirm a swing (default 5).

InpMaxBars - how many bars to scan on the chart (default 2000, 0 = all).

InpAlert - popup alert when a new swing is confirmed.

InpPush - push notification to the phone when a new swing is confirmed.

Buffers (for use from an Expert Advisor with iCustom and CopyBuffer)

Buffer 0 - swing high price (EMPTY_VALUE when there is none).

Buffer 1 - swing low price (EMPTY_VALUE when there is none).

Notes

This is a drawing tool, not a trading signal, and it makes no claim about profitability. It works on any symbol and timeframe.

Turtle Breakout Indicator Tested on Gold: Profitable in 2025 and 2026 (70) Turtle Breakout Indicator Tested on Gold: Profitable in 2025 and 2026 (70)

Turtle-style Donchian breakouts on gold, followed with three exits at once: an ATR trailing stop, the Turtle exit channel and a fixed target. Backtested on XAUUSD H1 and H4 in 2025 and 2026, where all twelve combinations were profitable. Non-repainting, with buffers for an Expert Advisor.

Gold Breakout EA for XAUUSD H4 +90 Percent in a 2020 to 2026 Backtest Gold Breakout EA for XAUUSD H4 +90 Percent in a 2020 to 2026 Backtest

A Turtle-style breakout EA for gold. It buys when an H4 bar closes above the 20-bar high in an uptrend, with a 2 ATR stop and a 2R target. Backtested on XAUUSD from January 2020 to September 2026: +9,029.72 on 10,000 at 1% risk, profit factor 1.77, max drawdown 11.38%, 6 of 7 years profitable.

Price Action Volumetric Order Blocks MT5 Price Action Volumetric Order Blocks MT5

Open-source MT5 indicator for confirmed market structure, volumetric order blocks and estimated buy/sell activity.

NeonDesk - Neon Manual Trading Panel with Multi-Timeframe Bias NeonDesk - Neon Manual Trading Panel with Multi-Timeframe Bias

Draggable on-chart manual trading panel with multi-timeframe bias, ATR SL/TP hints, a trailing stop and one-click BUY/SELL/CLOSE ALL.