Discussing the article: "Creating a Traditional Renko Overlay Indicator in MQL5"

 

Check out the new article: Creating a Traditional Renko Overlay Indicator in MQL5.

Create a traditional Renko indicator in MQL5 that converts candlestick closing prices into fixed-size blocks displayed on the main chart. We calculate the movement from the closing price of the last block, create new blocks of a user-defined size, confirm reversals using the two-block rule, manage block closing prices in a dynamic array, and display rectangles for visualizing the trend in real time.

To properly structure the logic, data handling, and visualization flow of the indicator from the start, it is best to first have a clear and detailed understanding of what we want to build and how it will be programmatically implemented in MQL5.

What We Are Building

In this article, we are going to build a Renko Overlay Indicator for MetaTrader 5. Unlike the standard candlestick chart, Renko charts filter out time and focus purely on price movement. Each brick only forms when the price moves a fixed distance called the brick size, regardless of how long it takes. Our indicator will draw Renko bricks directly on top of the regular candlestick chart so you can see both at the same time. This gives you the noise-filtering benefit of Renko while still keeping the context of real market candles.

A brick is simply a unit that represents a fixed amount of price movement. It does not depend on time like a candlestick. Instead, it only forms when the price moves a certain distance. That distance is what we call the brick size, which is the minimum movement required to create one brick.

The minimal price movement needed to create a new Renko brick is represented by the brick size, which is defined as a price interval. The proper brick size must be modified in accordance with the various symbols' varying price scales. For instance, a value of 0.0001 in EURUSD indicates one pip movement, making it adequate for capturing typical market movements, whereas a value of 1 is more suited in XAUUSD because of its greater price scale. This guarantees that the indicator behaves uniformly in many markets and generates significant Renko structures without necessitating modifications to the fundamental logic.

Figure 1. Renko Indicator

Author: ALGOYIN LTD