Discussing the article: "Creating an EMA Crossover Forward Simulation (Culmination): Interactive Synthetic Candles"
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Creating an EMA Crossover Forward Simulation (Culmination): Interactive Synthetic Candles.
This article finalizes the Forward Simulation Engine for MetaTrader 5 by calibrating synthetic candles to recent market volatility instead of using slope-only sizing. It samples average body, upper wick, and lower wick from closed bars, applies a sine-envelope with decay, proportional wicks, gaps between candles, and periodic counter-trend injections. The result is a live projection that advances one bar ahead, with code you can reuse for calibrated, anchor-based forward rendering and automatic cleanup.
In the first article, we built the core components of a Forward Simulation Engine for MetaTrader 5. We started with a basic EMA crossover detector. Then we added an anchor mechanism, an EMA-slope projection loop, a pip-based invalidation rule, and a chart-object rendering system. The result was a self-contained indicator capable of projecting a fixed number of synthetic OHLC candles beyond a confirmed crossover. These candles were drawn with visible bodies and wicks, labeled clearly on the chart, and automatically removed when invalidated or replaced by a new signal. This initial version established the foundation of the system, including signal detection, state management, object handling, and a repeatable candle-generation process. It also demonstrated that forward-looking visualization can be integrated into a traditional EMA indicator in a practical and useful way.
This article expands that foundation in three key areas. First, the projection engine now derives candle body and wick sizes from the average characteristics of recent market candles on the active symbol and timeframe. EMA slope remains a momentum factor, but candle dimensions now reflect the actual volatility of the instrument. As a result, projections naturally adapt to markets ranging from volatile XAUUSD on M15 to more stable EURUSD on H1. Second, the visual presentation has been enhanced with configurable spacing between candles, a sine-wave body-size envelope, proportional wick sizing, and controlled counter-trend candle injection. These additions create more realistic price sequences while preserving the overall directional bias.
Finally, the projected candles are now interactive. As each new market candle closes, the oldest projected candle is removed. The projection therefore remains anchored one bar ahead of the current market and advances continuously with incoming price data. Together, these improvements transform the original static projection into a live, self-updating forward simulation that evolves alongside the chart in real time.
Author: Hlomohang John Borotho