As traders, we all know that spotting the flaws in our trading strategies can be a game-changer. Wouldn't it be fantastic if we could visualize these weaknesses while also having access to objective trading statistics? Well, now we can!
MetaTrader 4 (MT4) has a backtester, but running a visual backtest for every tweak in your EA can be a real time-sink. Plus, its visual capabilities are pretty limited. Testing multi-currency strategies? Forget about it—at least not efficiently.
To tackle these challenges, I developed an open-source indicator designed specifically for visually testing trading strategies. While it’s impossible to create a one-size-fits-all indicator, the current framework is flexible enough to be modified for specific needs, including multi-currency strategies.

Spread Management
A key feature of this indicator is its spread management. It considers spreads just like real trading and the MT4 backtester does. If you decide to modify the indicator for personal use, take a close look at the spread management. Otherwise, you might find that your strategy looks great on a 1-minute chart, but in reality, it could be a total flop! :)
As a practical example, I'm including an indicator with a straightforward trading strategy based on moving average (MA) crosses, while also considering price action to allow for trades even before actual crosses occur—helping to reduce lag. The exit strategy is implemented using opposite signals and a slow MA crossing in reverse, along with stop loss management via a modified Chandelier SL strategy. This indicator serves as a template that you can customize, but many traders find it effective enough for manual trading.
The Concept Behind This System
The system is designed in a modular fashion. We first implement a trading strategy into a trading indicator, which uses two buffers for entry signals, two for exit signals, and one for stop loss. You can find a fully functional sample of this indicator named StrategyIndi_1.0.
We can then evaluate this strategy using the strategy testing indicatorStrategySym_1.0. If the results don't meet your expectations, optimizing the trading indicator allows you to see changes in real time through objective statistics.

When you're ready to implement an EA, it's a breeze. By calling a custom trading indicator, you'll receive all the entry and exit signals along with SL values.
How to Use This System and Adapt It to Your Needs
To get started with the system, simply copy both indicators into your MetaTrader\experts\indicators folder. Make sure to restart your terminal to compile them properly.
Some settings may require adjustment; most are self-explanatory, but here are a few key parameters:
- StrategyIndi Parameters:
- ChandBars = 7 (number of bars for the Chandelier SL strategy)
- ChandATRFact = 2.0 (factor to multiply the long-term ATR for Chandelier distance)
- RiskPercent = 2.0 (risk percentage of the free account balance for lot calculation)
- Offset = 10 (offset in pips for placing arrows on the chart)
- BarsBack = 2000 (number of past bars to process)
- AlertSound = "alert.wav" (WAV file for sound alerts)
- UseSoundAlert = true (if you want sound alerts)
- UsePopupAlert = true (if you want pop-up window alerts)
- WriteToLog = false (if you want to write log details for debugging)
- StrategySim Parameters:
- MaxLossAtSL = 200.0 (maximum loss per SL in account currency)
- BarsBack = 2000 (number of bars to process for strategy evaluation)
- WriteToLog = false (if you want to write log details for debugging)
When adapting the system to your needs, remember to transfer all relevant parameters from your own StrategyIndi indicator to the StrategySym indicator for simulation purposes. Fixed values can be used for other parameters (like UseSoundAlert). There’s no need to change anything else unless you’re aiming for a different purpose, like multi-currency strategies. In that case, comments and variable names should guide you along the way. If you need help, feel free to reach out at the contact info below.
With this system, my goal is to contribute to a more objective evaluation of trading strategies, whether for manual systems or EAs. Current marketing tactics can often be misleading, leading many newcomers to lose their hard-earned cash.
Best regards,
Robert
For comments, MT4 programming assistance, or any inquiries, please contact me at robert [dot] leskovar [at] gmail [dot] com. Please note that the MQLTools website in the source code is no longer active.

Comments 0