Idea by: Scriptor.
MQL5 Code by: Vladimir Karputov.
Are you looking to enhance your trading strategy? The Doji Arrows EA is designed specifically for MetaTrader 5 and utilizes the Doji candlestick pattern to identify potential trading opportunities.

One of the great features of this EA is the ability to adjust the candlestick body size through the "Size of a body of a candle (Open Close)" parameter, allowing for tailored trading setups.
How It Works
The EA kicks into action when a new bar forms. It analyzes the previous two bars (bar #2 and bar #1). If bar #2 is identified as a Doji, it checks for the following signals:
- If close#1 > high#2, it's a signal to open a BUY;
- If close#1 < low#2, it's a signal to open a SELL.
Settings You Can Customize
- Lots (if "0" → the parameter "Risk" will be used) - Set the lot size manually. If you choose "0", the "Risk" parameter (risk percentage of free margin per trade) will take effect;
- Stop Loss (in pips) - Define your Stop Loss; setting it to "0" will disable this feature;
- Take Profit (in pips) - Set your Take Profit; a value of "0" disables it;
- Trailing Stop (in pips) - Activate trailing stop; if set to "0", it will be disabled;
- Trailing Step (in pips) - Specify the trailing step;
- Risk (if "0" → the parameter "Lots" will be used) - This is your risk percentage of free margin per trade;
- Size of a candle (Open Close) - Adjust the candlestick body size;
- Magic Number - This is a unique identifier for your EA.
Keep in mind that if you set the "Size of a candle" to 0, you can expect only about 15-30 trades on the H1 chart over the course of a year. Check out the profitability below:

However, if you increase this parameter to 1, you will see a tenfold increase in the number of trades, leading to a different profit distribution:

In summary, the Doji Arrows EA offers a unique way to leverage the powerful Doji pattern in your trading. Give it a try and see how it can fit into your trading strategy!
Related Posts
- Harnessing MQL5 Wizard for Trading Signals: 3 Black Crows & 3 White Soldiers with MFI
- Creating an Expert Advisor for Dark Cloud Cover and Piercing Line Patterns with CCI Confirmation
- Mastering Trading Signals with MQL5 Wizard: Bullish and Bearish Engulfing Strategies
- Creating a Stochastic-Based EA for Hammer and Hanging Man Patterns in MetaTrader 5
- Harnessing MQL5 Wizard for Bullish and Bearish Harami Signals with CCI Confirmation