Today, we’re diving into the mystical realm of backtesting—where dreams of profits go to dance with the ghosts of trades past. Now, grab your digital compass because we’re embarking on a thrilling expedition to explore our very own EMA-Crossover strategy!
What Is the EMA-Crossover Strategy?
Before we embark on our backtesting escapade, let’s quickly review what the EMA-Crossover strategy is.
The EMA crossover strategy is a popular method used by many traders to capitalize on trends in the financial markets.
We have developed this strategy in the previous article where a long position is initiated when EMA1 crosses above EMA2, while a short position is established when EMA1 crosses below EMA2. Learn More.
Setting the Stage
We’ll be using historical market data to see how our little EMA-Crossover strategy performs. Imagine putting on a pair of virtual 3D glasses as we flip through the history of various symbols—like a documentary, but instead of deep philosophical discussions, we just want to see if we’d be rich or still eating instant noodles.
We choose the following symbols to
backtest:
- Selecting Symbols: EURUSD, GBPUSD, XAUUSD.
- Timeframes: M15
- Backtest period: over a decade
*The default input settings for the Expert Advisor (EA) that we established during the development phase are illustrated in below. In this configuration, a long position is initiated when EMA1 crosses above EMA2, while a short position is established when EMA1 crosses below EMA2:
- EMA1 -> 8.
- EMA2 -> 21.
- StopLoss -> 500.
- TakeProfit -> 500.
The Backtest Begins!
_ Since we have already saved the strategy, we can now select the Expert Advisor (EA) from our saved EA list for the backtest:
_Let's select inputs for the backtests:
_Waiting for the backtest to be finished:
_Saving the result after the backtesting is finished:
Comparing the results
- Navigate to the History Page from the left sidebar after logging into your dashboard.
- Select/Check box the results (GBPUSD, EURUSD, XAUUSD).
- Click on 'Compare' button.
- Checking the Metrics: The Good, the Bad, and the Predictably Ugly
Let's analyze the metrics, the part where we truly find out if we're the next Warren Buffet or just someone yelling at a computer screen.
- Profit Factor: This is essentially how many dollars you’ve pocketed for every dollar lost. If it’s greater than 1, congratulations! You’ve got yourself a strategy that can generate income.
- Win Rate: Considering our Strategy's RR which is 1:1, A high percentage here signals you’re doing something right. If you’re hovering around 50%, well, you might need a lucky charm (or a unicorn). A win rate may vary, like that one friend who cannot decide between pizza and sushi.
- Drawdown: Low drawdown is a desirable characteristic of a trading strategy because it aligns with risk management principles and helps traders achieve more consistent performance. By implementing effective strategies and maintaining discipline, traders can aim for low drawdowns while pursuing profitable opportunities in the market.
EMA-CrossOver.ex4
EMA-CrossOver.mq4
EURUSD-EMA-CrossOver.ex4.zip
GBPUSD-EMA-CrossOver.ex4.zip
XAUUSD-GOLD-EMA-CrossOver.ex4.zip
Please Login or Signup
to be able to download the files.