If you're looking to create an Expert Advisor (EA) that leverages the power of the Morning and Evening Star candlestick patterns, the MQL5 Wizard is a great place to start. This tool enables you to whip up ready-made EAs using the Standard Library classes that come with the MetaTrader 5 client. Check out the guide on Creating Ready-Made Expert Advisors in MQL5 Wizard for a deeper dive.
The overall idea is straightforward: you’ll derive your trading signals class from the CExpertSignal. After that, you'll need to override the LongCondition() and ShortCondition() methods with your own implementations.
A useful resource is the book "Strategies of Best Traders", which dives into various trading strategies. For our purposes, we’ll focus on reversal candlestick patterns that are confirmed by oscillators such as Stochastic, CCI, MFI, and RSI.
The ideal approach is to create a dedicated class derived from CExpertSignal for identifying candlestick patterns. For confirming the trade signals generated by these patterns, you can create a class derived from CCandlePattern and incorporate the necessary features, like oscillator confirmations.
In this post, we’ll specifically look at signals based on the Morning Star and Evening Star reversal patterns, confirmed by the CCI indicator. The signals module will be based on the CCandlePattern class, showcasing a simple example of how to create trade signals with candlestick patterns.
1. Understanding Morning and Evening Star Patterns
1.1. Morning Star
The Morning Star pattern signals a potential reversal of a downtrend and consists of three candles (see Fig. 1). After a lengthy bearish candle, you’ll spot a candle with a small body (color is irrelevant) that lies outside the body of the previous black candle. This small body indicates that bulls and bears are at parity, suggesting a trend change is on the horizon.
The third candle in the pattern is a bullish one; its body does not overlap with the second candle, and its closing price falls within the body of the first bearish candle. The resulting candle from this model is illustrated in Figure 1. If the second candle resembles a doji, we refer to this pattern as the
Comments 0