Discussing the article: "MetaTrader 5: Build a Market to Suit Your Strategy — Renko/Range/Volume, Synthetics, and Stress Tests on Custom Symbols"

 

Check out the new article: MetaTrader 5: Build a Market to Suit Your Strategy — Renko/Range/Volume, Synthetics, and Stress Tests on Custom Symbols.

In this article, we demonstrate how to use API of the MetaTrader 5 custom symbols to transform your terminal into a data constructor for generating timeless Renko, Range, and Equal-Volume charts and assembling synthetic instruments. We will analyze tick aggregation and history modification for stress tests (spread widening, stop level changes) taking into account platform limitations. Besides, you will get some practice of handling CiCustomSymbol and routing orders to a real symbol through the CustomOrder wrapper with ready-made code fragments.

The standard MetaTrader 5 chart is a reliable tool, but it is tightly tied to timeframes, the broker's quote feed, and the calendar grid. In modern algorithmic trading, this is often insufficient: so-called volatility noise, gaps in history, and fixed time intervals distort real dynamics. What if the terminal allows you not only to read the market, but also to design its representation to suit the needs of a specific strategy?

With the development of the custom symbols API, MetaTrader 5 has changed its architecture: the trader is no longer just a passive consumer of quotes and becomes a data architect. A custom symbol is not an offline chart for visualization, but a fully-fledged terminal object with its own tick history, contract specification, and native support in the Strategy Tester.

Now you can generate timeless charts (Renko bars, Range bars, equal volume bars), assemble synthetic instruments and baskets, and run stress tests by arbitrarily changing the spread, stop levels, and margin requirements directly in the code.

In this article, we will explore the practical aspects of working with custom instruments: data storage structure, the basic MQL5 API, tick aggregation algorithms, and history modification. Let's look at how to adapt standard EAs to route trading orders from a custom symbol to a real trading instrument.

Author: MetaQuotes

 

Very interesting article - re-reading it repeatedly....

 

Has anyone managed to make a renko chart using the indicator from this article?

I don't want this indicator to work for some reason.


 
Aleksandr Slavskii #:

Has anyone managed to make a renko chart using the indicator from this article?

I don't want this indicator to work for some reason.

A very big "brick" has been set.

 
Dmitriy Skub #:

A very large "brick" has been placed.

As it was default in the indicator, that's what I put.

Thanks, indeed, if you make the brick smaller, the graph appears.