All indicators

Diamond Top/bottom

By LuxAlgoMay 28, 2026

Diamond Top/bottom is an indicator on Vela, our next-generation charting platform, written in Pine Script®.

Static chart image

Diamond Top/bottom detects the four-sided reversal shape of a diamond top and bottom: alternating swings that broaden into a widest point, then contract, with verified touches on every edge. Its first Library build classifies each find by the prior move (advance means top, decline means bottom) and completes it when a close pushes decisively beyond a contracting edge, drawing edges, fill and a label.

How to Trade the Diamond Top/bottom?

  • Forming preview: dotted boundaries appear once expansion-then-contraction confirms on all four edges, the earliest honest look.
  • Decisive break: a close through a converging edge completes the pattern; trade the actual break direction.
  • Measure-rule target: the widest-point height projected from the break, tracked as a dotted line until reached.
  • Failure watch: acceptance back inside the broken boundary negates the pattern, marked with a cross.

Diamonds are among the rarer members of the chart pattern family, so the touch requirements are strict by design.

Diamond Top/bottom Settings

  • Swing Length (default 6) and Maximum Swings (default 12): swing confirmation span, and the scan cap for one pattern.
  • Touches per Edge (default 2): swing touches per edge.
  • Decisive Break Buffer (ATR) (default 0): extra ATR a close must clear.
  • Require Sharp Prior Move (default enabled), Prior Move Window (bars) (default 20), Minimum Prior Move (x ATR) (default 2) and Volatility Baseline Length (default 50): the ATR-normalized steep move that classical diamonds follow.
  • Volume Fade Filter (default disabled): require volume to fade from the broadening half into the contracting half.
  • Measure-Rule Target (default enabled) and Failure Watch (bars) (default 12): objective tracking and the post-break negation window.
  • Style toggles: forming preview, pattern fill and the bullish/bearish colors.

Frequently Asked Questions

Free to use

Run it on Vela. Go further with a paid plan.

  • Up to 500 Custom Alerts, with webhook automation
  • Up to 10× the chart history of Free
  • Orderflow lookback up to full history
  • More Quant usage to customize it, plus extra usage when you need it
  • Futures data alongside crypto, stocks, forex and commodities
See plans
Original indicatorBuilt in-house by LuxAlgo

Run it on Vela. Make it yours with Quant.

Open this indicator free on Vela, our next-generation charting platform. Then ask Quant, our coding agent built into Vela, to retune it or turn it into a backtested strategy of your own.