Discussing the article: "Creating Three-Dimensional Bars in MQL5"

Check out the new article: Creating Three-Dimensional Bars in MQL5.

Migrating 3D bars from Python to native MQL5: instead of Plotly and a bridge to the terminal — a scene using CCanvas3D and DirectX 11 directly on the chart. Price, time, and tick volume are plotted along three axes; the geometry is assembled manually from vertices and triangles; and a mouse-controlled orbit camera allows interactive exploration without external dependencies.

About a year ago, in the article “Creating 3D Bars Based on Time, Price, and Volume,” I built a three-dimensional representation of the market using Python. The MetaTrader 5 and Plotly integration exported quotes, calculated the volume profile, and rendered an interactive scene. Time, price, and volume were plotted along its three axes. The approach worked and yielded some interesting observations — those same yellow volume–volatility clusters before reversals. But there was a catch: the scene existed outside the terminal. It required a Python bridge, historical data exports, and a separate process, and the result opened in a browser as a static snapshot, disconnected from the live chart.

In this article, we bring the concept back into MetaTrader 5. The scene is built using CCanvas3D and DirectX 11, with no external dependencies. It sits over the chart, can be rotated with the mouse and zoomed with the scroll wheel, and is rebuilt using the latest historical data at the click of a button. No Python, no Plotly, no browser — just the platform's built-in tools.


Author: Yevgeniy Koshtenko