This Expert Advisor (EA) leverages the Fractals indicator to enhance your trading strategies. It operates exclusively at the opening of a new bar, ensuring that you catch the best opportunities as they arise. The lot size is calculated as a percentage of your available margin, which helps manage risk effectively.
When an upward fractal appears, the EA generates a Sell signal and promptly closes all Buy positions. Conversely, when a downward fractal is detected, it triggers a Buy signal, closing any active Sell positions. This approach keeps your trades aligned with market trends.
For those looking to fine-tune their strategy, this EA offers two key input parameters that simplify the configuration process:
- Distance (in pips) - This parameter defines the minimum distance between fractals.
- Signal Bar - This refers to the bar number (relative to the current one) where the fractal is assessed.

Fractals minimum distance. The "Distance" parameter
Signal Bar – Determines which bar is analyzed for fractal formations.
Related Posts
- Harnessing MQL5 Wizard for Trading Signals: 3 Black Crows & 3 White Soldiers with MFI
- Mastering Trading Signals with MQL5 Wizard: Bullish and Bearish Engulfing Strategies
- Creating an Expert Advisor for Dark Cloud Cover and Piercing Line Patterns with CCI Confirmation
- Mastering the Moving Average EA for MetaTrader 5: A Trader's Guide
- Creating a Stochastic-Based EA for Hammer and Hanging Man Patterns in MetaTrader 5