If you're diving into the world of automated trading, the MQL5 Wizard is your best friend. It allows you to whip up Expert Advisors (EAs) on the fly, leveraging the Standard Library classes that come bundled with MetaTrader 5. With it, you can quickly test your trading strategies by creating custom trading signals classes. Don’t forget to check out MQL5 Wizard: How to Create a Module of Trading Signals for a deeper dive.
The core idea is straightforward: derive your trading signals class from CExpertSignal. From there, you’ll want to override the LongCondition() and ShortCondition() methods with your own logic.
There's a noteworthy book titled "Strategies of Best Traders". While it's in Russian, it covers various trading strategies, and we'll focus on reversal candlestick patterns, particularly those confirmed by the Stochastic indicator, along with CCI, MFI, and RSI oscillators.
To check for candlestick pattern formations, it's smart to create a separate class based on CExpertSignal. For confirming the signals generated by these patterns, simply derive a class from CCandlePattern and add the necessary features like oscillator confirmations.
1. Understanding Morning and Evening Star Patterns
1.1. Morning Star
This pattern signals a reversal from a downtrend, made up of three candles (see Fig. 1). After a long bearish candle, you’ll see a small-bodied candle (the color doesn’t matter) that sits outside the first candle’s body. This small body indicates a balance of power between bulls and bears, suggesting a trend change is on the horizon.
The third candle is bullish, and its body doesn’t overlap the second candle’s body, closing inside the first bearish candle. If the second candle is a doji, then we call it a "Morning Doji Star."

Figure 1. Morning Star and Morning Doji Star candlestick patterns
The identification of the "Morning Star" pattern is done through the CheckPatternMorningStar() and CheckPatternMorningDoji() methods in the CCandlePattern class:
//+------------------------------------------------------------------+ //| Check formation of theRelated Posts
- Mastering Trading Signals with MQL5 Wizard: Bullish and Bearish Engulfing Strategies
- Harnessing MQL5 Wizard for Trading Signals: 3 Black Crows & 3 White Soldiers with MFI
- Creating a Stochastic-Based EA for Hammer and Hanging Man Patterns in MetaTrader 5
- RRS Impulse: Your Go-To Scalping EA for MetaTrader 4
- Leveraging MQL5 Wizard: Crafting Trade Signals with Meeting Lines and Stochastic