This semafor indicator MT4 version marks swing highs and lows at three levels: small dots for minor swings, medium circles for intermediate swings and large circles for major swings. It is written from scratch and uses closed candles only, so each mark appears a set number of candles after the swing and then never moves.
Traders also search for it as “semafore” or the semaphore indicator. The idea is the same: a quick visual map of which turning points matter and which are noise.
What Is the Semafor Indicator?
A semafor indicator for MT4 is a swing-point marker that grades each turning point by size. The best-known version is the free “3 Level ZZ Semafor,” which is built on ZigZag-style calculations with three different depths. This indicator follows the same three-level idea with its own, simpler rule set, and it is designed so that what you see on history is exactly what you would have seen in real time.
The three levels help you separate structure. A level 1 dot can appear every few candles. A level 3 circle marks a swing that was the extreme for dozens of candles on both sides, the kind of high or low that often becomes support or resistance later.
How the Semafor Indicator Is Calculated
Each level uses one period: Period1 = 5, Period2 = 13 and Period3 = 34 by default.
- A candle is a level N swing high when its high is the highest high from PeriodN candles before it to PeriodN candles after it.
- A candle is a level N swing low when its low is the lowest low over the same window.
- If two candles share the same extreme, only the newer one is marked, so a flat double top or bottom gets one mark.
- Swing highs are marked on the candle’s high in HighColor and swing lows on the candle’s low in LowColor.
Because the windows are nested, a level 3 swing is also a level 2 and level 1 swing. On the chart that shows up as a large circle around a medium circle around a small dot, which makes major swings easy to spot at a glance.
A candle can be both a swing high and a swing low if it is a large outside candle. In that case it gets both marks.
Key Features
- Three swing levels with separate on and off switches.
- Different colors for swing highs and swing lows.
- Closed candles only: once a mark appears it stays exactly where it is.
- Optional alerts, sound and mobile push when a new swing is confirmed, filtered by level.
- No chart objects, just indicator buffers, so it is light and clean to remove.
How to Trade With the Semafor Indicator
Use level 3 for structure
Level 3 marks are the major swings. Draw horizontal lines through recent level 3 highs and lows and you have a working map of support and resistance. A series of higher level 3 lows and higher level 3 highs describes an uptrend, and the reverse describes a downtrend. Levels 1 and 2 fill in the detail between them.
Confluence with support and resistance
A semafor mark carries more weight when it forms at a level that already mattered, such as a prior level 3 swing, a daily pivot or a zone from the Supply and Demand indicator. The Daily Support and Resistance Special indicator is another way to add reference levels.
Reversal entries
- Long: a level 2 or level 3 swing low is confirmed at support. Enter on the next candle, or wait for a break of the most recent minor high. Place the stop below the marked low.
- Short: a level 2 or level 3 swing high is confirmed at resistance. Enter on the next candle or a break of the latest minor low, with the stop above the marked high.
Keep in mind that by the time a level 3 mark appears, price has already moved for 34 candles away from the swing. On the default settings, level 1 and level 2 marks are the ones you can act on. Level 3 marks are better for context and for placing stops. Size each trade from the stop distance with the position size calculator.
Many traders confirm swing entries with candle patterns, such as those found by the Pin Bar indicator, or with an oscillator such as the Stochastic Momentum Index (SMI) indicator turning from an extreme.
Semafor Indicator MT4 vs ZigZag
The ZigZag Arrow indicator and MT4’s built-in ZigZag connect alternating highs and lows with lines. They are good at showing the overall wave shape, but the last leg can redraw while price is still extending, and only one swing size is shown at a time. See whether ZigZag is a lagging indicator for more on that.
| Semafor (this version) | ZigZag | |
|---|---|---|
| Output | Dots and circles on swing candles | Lines joining alternating highs and lows |
| Swing sizes | Three levels at once | One depth setting |
| Alternation | Not required: two highs in a row can both be marked | Always high, low, high, low |
| Latest point | Appears after PeriodN closed candles, then fixed | Can move while the current leg extends |
Many semafor versions are built on ZigZag code, so they inherit that moving last point. This one is not, which is why it waits for confirmation.
Best Settings
- 5, 13, 34 (default): a good spread of minor, intermediate and major swings on M15 to H4.
- 3, 8, 21: faster marks with less delay, useful for scalping and lower timeframes, with more noise.
- 8, 21, 55: fewer and larger swings, suited to H4 and daily charts.
- AlertMinLevel: 2 is often the practical choice. Level 3 alerts are rare and arrive late, level 1 alerts can be frequent.
Does It Repaint?
No, but it is delayed, and the delay is the important part. A candle cannot be called the highest high of the last PeriodN candles on each side until PeriodN more candles have closed after it. This indicator waits for those candles to close, so:
- A level 1 mark appears after 5 more candles have closed.
- A level 2 mark appears after 13 more candles have closed.
- A level 3 mark appears after 34 more candles have closed.
The mark is drawn on the swing candle itself, back in time, but it only shows up once the confirming candles have closed. After that it never moves or disappears, because every candle it depends on is closed. The live candle is never used. If a semafor tool shows a mark on the most recent few candles, it is either using the forming candle or a ZigZag-style calculation, and that mark can still change. See what repainting is for why this matters when you review past signals.
How to Install
Copy “semafor-indicator-mt4.mq4” to File > Open Data Folder > MQL4 > Indicators, restart MT4 or refresh the Navigator, and drag it onto a chart. The marks appear on the price chart. See how to install indicators in MT4 for step-by-step help.
Related Indicators
- Gann Swings indicator offers another view of swing structure.
- Auto Trend Lines and Channels indicator draws lines from swing points.
- False Breakout indicator flags failed moves beyond recent highs and lows.
- Order Block indicator marks zones that often line up with major swings.
Swing marks describe what price has already done. Trading on margin carries a high level of risk, so test any semafor approach on a demo account first.

