We need a developer experienced with MetaTrader 5 (MT5) to create a script for backtesting and automating a trading strategy based on Fibonacci levels and EMA signals. The strategy should work for both daily and hourly timeframes and include specific conditions for signal activation, entry, stop loss, and take profit. The final deliverable must also allow backtesting on historical data (XAUUSD and EURUSD) for the past 10 years.
Strategy Details:
1. Fibonacci Levels:
• Calculate Fibonacci levels (0, 0.5, 1, 1.5, 2, -0.5, -1, -1.5) using:
• Last 3 months’ highs and lows (Daily timeframe).
• Last 3 days’ highs and lows (Hourly timeframe).
• Anchor levels to the respective candles with line rays extending to the right and lock them until the next period starts.
2. 5 EMA:
• Add a 5-period EMA calculated from the closing price.
• Use this as the main signal line.
3. Signal Activation:
• A signal activates when the 5 EMA crosses a Fibonacci level and locks above/below after the candle closes.
• The lock candle should not touch the next Fibonacci level for the signal to remain valid.
4. Entry, Stop Loss, and Take Profit:
• Entry: Close price of the lock candle.
• Stop Loss: Number of pips to the next Fibonacci level.
• Take Profit:
• 50% at the next Fibonacci level.
• The remainder at a 1:2 risk-to-reward ratio.
5. Reactivation:
• A signal can reactivate only after the 5 EMA locks in the opposite direction first.
6. Data Logging:
• Pair, Buy/Sell, time of signal activation, session, price details, pips, and reversal metrics.
• Comprehensive metrics to evaluate performance.
7. Backtesting Requirements:
• Use MT5’s Strategy Tester with 10 years of historical data for XAUUSD and EURUSD.
• Include functionality to optimise strategy parameters.
Deliverables:
1. MT5 script/EA implementing the above strategy.
2. Backtesting results for XAUUSD and EURUSD (last 10 years).
3. Source code and documentation for strategy parameters, usage, and outputs.
Preferred Skills:
• Strong experience with MQL5 for MT5 scripting.
• Familiarity with Fibonacci levels, EMA indicators, and backtesting.
• Proven ability to automate trading strategies.