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

Consecutive Bars (with history) - indicator for MetaTrader 5

Ryan L Johnson
Ryan L Johnson
Beginning on March 6, 2026 I am PROGRAMMING MQL5 INDICATORS, EA's, AND SCRIPTS FOR FREE as announced in my Blog.
| English Русский 中文 Español Deutsch 日本語 Português 한국어 Français Italiano Türkçe
Views:
1890
Rating:
(2)
Published:
Updated:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

I have repeatedly seen traders clamoring for an indicator that counts consecutive up and down candles (bars) in the Forum. Clearly, many traders use, or want to use, that indicator. Although I've seen various options for MT4, options for MT5 appear to be limited. The consecutive bar counting indicators that I found merely show the current count of consecutive bars that print in the current price direction. Therefore, I coded this Consecutive_Bars indicator for MT5.

The main benefit of this indicator is that you can set a level at the most frequently appearing "false swing" count─thereby filtering those false swings out of your trading. The blue line study shows up bars, and the red line study shows down bars. Upon 1 bar printing in the opposite direction of the count, the line studies (respectively) return to the 0 level.

The indicator has been updated to version 1.50 which includes 2 moving averages for determining where price has exceeded the average count of consecutive up bars, and where price has exceeded the average count of consecutive down bars, respectively. Indicator flicker and a stack overflow error has been fixed in version as well. Zero values are ignored by the moving average calculations. It's more sensible to exclude the bars that are not up bars from the average consecutive up bars number, and the same for down bars. General efficiency improved as well.


XAUUSDH1

Multi-Timeframe Candle Map Multi-Timeframe Candle Map

An educational MT5 panel that maps the live price vertically inside four developing candles and summarizes location alignment, dispersion, candle direction and time remaining.

SR Zone Scanner SR Zone Scanner

Multi-timeframe Support & Resistance zone scanner with strength rating and instant alerts — M15, H1, H4, D1.

MQTTFive — MQTT 5.0 Client Library MQTTFive — MQTT 5.0 Client Library

MQTTFive — a fully-featured implementation of the MQTT 5.0 client for MQL5. Features: • MQTT v5.0 — all packet types, properties, QoS 0/1/2 • TCP + TLS via the native MQL5 Socket API • Will messages with properties (will_delay_interval, payload_format, message_expiry) • Topic aliases for outgoing PUBLISH messages • Flow Control (Receive Maximum) • Subscription Options (no_local, retain_as_published, retain_handling) • Binary and UTF-8 payloads • Automatic retry for QoS 1/2 • Zero DLL dependencies — pure MQL5 Tested with Mosquitto 5.0 (15 tests, all PASS). Documentation: https://github.com/chekh/MQTTFive Licence: MIT

Prop Firm Risk Dashboard - daily loss and drawdown monitor Prop Firm Risk Dashboard - daily loss and drawdown monitor

A read-only on-chart panel that tracks your account against a daily-loss limit and a max-drawdown limit, with color-coded OK / WARNING / DANGER status. Monitoring only - it does not place, modify or close any orders.