In this post, we’ll go through a Morning Start Candlestick Pattern Amibroker AFL Code. The AFL code can be downloaded free of cost and imported into Amibroker.
Morning Start Candlestick Pattern Overview
The Morning Star candlestick pattern is a bullish reversal pattern that typically forms at the bottom of a downtrend. It consists of three candles, with the first being a bearish candle, the second being a small-bodied candle that can be bullish or bearish, and the third being a bullish candle.
The pattern suggests that selling pressure is weakening and that buyers are gaining control of the market, leading to a potential reversal in trend.
The second candle is important as it represents a period of indecision in the market, with neither buyers nor sellers having a clear advantage. The third candle confirms the reversal, with the bulls taking control and pushing prices higher. Traders often use the Morning Star pattern in conjunction with other technical indicators to confirm potential buy signals.
Also Read: Balance of Power Indicator Amibroker AFL Code
Morning Start Candlestick Pattern Amibroker AFL Download
Please download the AFL code from this link. It can be readily imported into Amibroker.
Morning Start Candlestick Pattern Amibroker AFL Screenshot
Check out the screenshot of this AFL below
AFL Explanation
- We start by defining the criteria for identifying the Morning Star candlestick pattern. The Morning Star pattern consists of three candles – a bearish candle, a small-bodied candle, and a bullish candle.
- We use the
Ref()
function to refer to the values of the previous candles in the calculation of the pattern criteria. For example,Ref(Close, -2)
refers to the closing price of the candle that occurred two periods ago. - The first criterion for the Morning Star pattern is that the first candle must be bearish. We check this by comparing the closing price and opening price of the candle that occurred two periods ago with the closing price of the candle that occurred one period ago and the opening price of the candle that occurred two periods ago.
- The second criterion is that the second candle must be small-bodied. This means that the opening and closing prices of the candle that occurred one period ago must be very close to each other.
- The third criterion is that the third candle must be bullish. We check this by comparing the opening and closing prices of the current candle with the closing price of the candle that occurred one period ago and the opening price of the candle that occurred two periods ago.
- Once we have defined the criteria for the Morning Star pattern, we use the
PlotShapes()
function to plot an up arrow on the chart whenever the pattern is detected.
So, in summary, this AFL code identifies the Morning Star pattern by checking for the presence of three specific candles on the chart. When the pattern is detected, it plots an up arrow on the chart.
Also Read: Weekly Breakout Trading Strategy Amibroker AFL Code
Disclaimer
All the AFLs posted in this section are for learning purposes. Trading Tuitions does not necessarily own these and we don’t have any intellectual property rights on them. We might copy useful AFLs from public forums and post them in this section in a presentable format. The intent is not to copy anybody’s work but to share knowledge. If you find any misleading or non-reproducible content then please inform us at support@tradingtuitions.com