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
Creating an EMA Crossover Forward Simulation (Culmination): Interactive Synthetic Candles
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.