This double top indicator MT4 tool finds double tops and double bottoms automatically. It pairs two confirmed swing highs or swing lows at nearly the same price, draws the neckline between them and places an arrow on the candle that closes through that neckline. Everything is based on closed candles, so a finished signal never moves.
It works as a double bottom indicator MT4 traders can leave running on several charts, and as a W and M pattern indicator MT4 users can rely on for one consistent rule instead of eyeballing the chart. If you want the background on how these formations develop and how to read them by hand, see the guide to the double top and double bottom.
What Is the Double Top and Bottom Indicator?
A double top is two highs at about the same level with a pullback between them. It looks like the letter M. Buyers pushed price up twice and failed to get through the same area both times. The low of the pullback between the peaks is the neckline. The formation is only complete when price closes below that neckline.
A double bottom is the mirror image, a W shape. Two lows at about the same level, a rally between them, and a neckline at the high of that rally. A close above the neckline completes it.
Spotting these by eye is easy in hindsight and hard in real time. Two highs that look equal on a zoomed-out chart may be 30 pips apart, and a pullback that looks deep on one timeframe may be tiny on another. This double top and bottom indicator applies fixed, ATR-based rules so every pattern it draws meets the same test.
How the Indicator Detects a Pattern
The rules below describe a double top. A double bottom uses the same rules with highs and lows swapped.
- Two swing highs: each peak must be a swing high, meaning its high is above the SwingStrength candles after it and at least as high as the SwingStrength candles before it (5 by default).
- Similar height: the two highs must be within ToleranceATR times ATR (0.5 x ATR(14) by default), measured at the second peak. Using ATR means the tolerance adapts to the symbol and timeframe.
- Spacing: there must be between MinBarsBetween (5) and MaxBarsBetween (60) candles between the peaks.
- A clean pullback: every candle between the peaks must stay below the lower of the two peaks.
- Neckline: the lowest low between the peaks. The distance from the higher peak to the neckline must be at least MinDepthATR times ATR (1.0 by default), so shallow wiggles are ignored.
- Break: a closed candle must close below the neckline within MaxBarsToBreak candles (30) of the second peak. Only the first such close counts, and the pattern is dropped if any candle closes above the higher peak first.
When all of that is true, a sell arrow appears above the breaking candle. With ShowPatternLines on, a solid line joins the two peaks, a dotted neckline runs to the breaking candle and a “Double Top” label sits above the second peak. Double bottoms get a buy arrow, the same lines in the bottom color and a “Double Bottom” label.
Key Features
- Finds double tops and double bottoms on any symbol and timeframe.
- ATR-based tolerance and depth, so one set of inputs works across markets.
- Draws the peak line, the neckline and a text label for each pattern.
- Signals only on a closed-candle break of the neckline.
- Optional pop-up, sound and MT4 mobile push alerts.
How to Trade With the Double Top Indicator MT4
Sell rules for a double top
- Wait for the sell arrow. It appears on the candle that closed below the neckline.
- Enter at the open of the next candle, or wait for a pullback to the neckline from below, which many traders prefer because it gives a tighter stop.
- Place the stop above the higher of the two peaks. A tighter option is just above the neckline retest high, which is stopped out more often.
- A common first target is the height of the formation, from the higher peak to the neckline, projected down from the neckline. Take partial profit there or trail the rest behind new swing highs.
Buy rules for a double bottom
- Wait for the buy arrow on the candle that closed above the neckline.
- Enter on the next candle or on a pullback to the neckline from above.
- Place the stop below the lower of the two lows.
- Project the formation’s height up from the neckline for a first target.
Filters worth adding
These patterns carry more weight when the second peak forms at a level that already matters, such as a prior major swing or a daily high or low. Momentum divergence between the two peaks is another common filter: if price makes an equal or slightly higher second top while RSI makes a lower high, the RSI Divergence indicator will flag it. A rejection candle at the second peak, such as one found by the Engulfing Pattern indicator, also adds confidence. For more tools that fit this approach, browse the reversal trading indicators.
On lower timeframes these formations appear often and fail often. On H1, H4 and daily charts they are rarer and tend to be cleaner, which is why swing traders favor them.
Best Settings
- Defaults (5, 0.5 ATR, 5 to 60 candles, 1.0 ATR depth): a good starting point for M15 to H4.
- Stricter peaks: lower ToleranceATR to 0.3 for peaks that are closer to equal. You will see fewer patterns.
- Bigger formations: raise SwingStrength to 8 or 10 and MinDepthATR to 1.5 for daily charts and swing trades.
- Faster charts: SwingStrength 3 and MaxBarsBetween 40 suit M5 and M15 day trading, with more noise.
- MaxBarsToBreak: shorten it if you only want breaks that follow the second peak quickly. A neckline break long after the second peak is often a different market.
Does It Repaint?
No. Both peaks must already be confirmed swing points, and the signal only fires when a candle closes through the neckline. The arrow and lines are drawn at that close and stay fixed. The indicator never shows a double top that is still forming, because until the neckline breaks there is no completed pattern to show.
The trade-off is timing. The second peak needs SwingStrength closed candles after it before it counts, so on the default settings the pattern can only complete at least six candles after the second high. That delay is the price of signals that do not change. See what repainting is for why fixed signals matter when you review past charts.
How to Install
Copy “double-top-bottom-indicator-mt4.mq4” to File > Open Data Folder > MQL4 > Indicators, then restart MT4 or refresh the Navigator and drag it onto a chart. Follow how to install indicators in MT4 if you need each step.
Related Indicators
- Semafor indicator grades swing highs and lows into three sizes, a quick way to see which peaks are major.
- ZigZag Arrow indicator connects swings so you can see the M and W shapes form.
- Harmonic Pattern indicator scans for multi-leg reversal patterns built from the same swing points.
A completed pattern improves the odds of a move, it does not guarantee one. Trading on margin carries a high level of risk, so test these rules on a demo account first.
