A morning star is three candles: a big down candle, a small hesitating one, and a big up candle that closes well into the first. The morning star & evening star indicator measures each of those parts instead of guessing. Four numbers set how strict it is.
This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Main price chart |
| Plots | 2: Morning Star, Evening Star |
| Alerts | popup, push notification, email, sound |
| Inputs | 12 |
The visual side
Two marks, drawn on price.
`Morning Star` prints lime at width 2 with arrow 233.
`Evening Star` prints red at width 2 with arrow 234.
Each mark sits on the third candle.
`ArrowOffsetPts` `25` sets the gap.
No lines or panes are drawn.
- Morning Star: arrow, lime, width 2, arrow code 233
- Evening Star: arrow, red, width 2, arrow code 234

What the file computes
The two big candles
`MinBodyRatio` `0.55` requires the first and third candles to have bodies filling over half their range. Doji-like outer candles fail.
The star
`MaxStarBodyRat` `0.40` keeps the middle body small. Its top must sit near or below the first candle’s close, and `RequireGap` `false` allows it to overlap rather than gap.
The confirmation
`Penetration` `0.50` asks the third close to reach at least halfway back into the first candle’s body. A shallow recovery does not count.
Making the output useful
Lime marks are morning stars, after a fall.
Red marks are evening stars, after a rise.
Each mark confirms on the third candle’s close.
Stricter settings mean fewer, cleaner marks.
The pattern says nothing about the wider trend.
Warm-up needs three bars.
Alert channels in this build: popup, push notification, email and sound.
A completed star pattern is what reports. `EnableAlerts` is the parent switch and a popup shows it; mobile, mail and the speaker route behind `SoundFile` start off.
Every Morning Star & Evening Star Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
MinBodyRatio |
outer candle body / range. Body share for the outer candles, `0.55`. | 0.55 |
MaxStarBodyRat |
middle star body / range. Largest body share for the star, `0.40`. | 0.40 |
Penetration |
3rd close into 1st body. How far the third close reaches into the first, `0.50`. | 0.50 |
RequireGap |
require middle to gap from 1st body. Demand a true gap before the star, `false`. | off |
Display settings
| Setting | What it does | Default |
|---|---|---|
ArrowOffsetPts |
arrow Y offset in points. Mark gap in points, `25`. | 25 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
Section_Alerts |
(see inputs panel) | ==== Alerts ==== |
EnableAlerts |
Parent switch for pattern news, `true`. | on |
EnablePopup |
Popup in the terminal, `true`. | on |
EnablePushNotify |
Mobile notice, `false`. | off |
EnableEmail |
Mail notice, `false`. | off |
EnableSound |
(see inputs panel) | off |
SoundFile |
Speaker clip if enabled, `”alert.wav”`. | alert.wav |

Fitting it to a chart
Three-candle patterns need bars that each mean something. EURUSD H1 is the reference chart, where a clean star shows up a few times a month. On M5 the shapes are mostly noise. On D1 they are the textbook case.
The honest limits
Forex rarely gaps, so the classic star is loosened.
A pattern at a random spot means little.
Penetration of half a body is a convention.
Marks confirm only after the third candle closes.
Copy the compiled Morning Star & Evening Star Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.
Download the Morning Star & Evening Star Indicator for MT4 and MT5
The zip holds the compiled Morning Star & Evening Star Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.
Download this indicator free
Enter your email and the file is yours. You also get the full MT4 and MT5 library.
FAQ
Why does RequireGap ship false?
Currency pairs trade around the clock and rarely gap between candles. Demanding a true gap would make the pattern almost impossible on forex, so the star only has to sit near the first close.
What does Penetration 0.50 measure on a Morning Star?
How far the third candle’s close climbs back into the first candle’s body. At half, the recovery must undo at least half of that first drop.
How small must MaxStarBodyRat 0.40 keep the star?
Its body can fill no more than forty percent of its own range. That keeps the middle candle a sign of hesitation rather than a trend candle.
Does an Evening Star need a prior rise?
The code tests only the three candles. It is up to you to check the pattern arrives after a real advance, which is where it carries its meaning.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Morning Star & Evening Star Indicator as one input. Always backtest before trading live.
Category: this is part of our Candle Sticks collection. Browse more Candle Sticks for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- For background on this concept, see Portfolios with Purpose on Wikipedia.
- For broader market context, see Coppock Curve at StockCharts ChartSchool.
