elliottTriangleWave

The Elliott Triangle Wave is a corrective pattern made of five legs (A–B–C–D–E) that form a contracting or expanding triangle. It often happens before the final wave of a trend or inside complex corrections. Traders use it to anticipate the breakout direction after the triangle finishes.

Syntax

elliottTriangleWave(originPoint, pA, pB, pC, pD, pE, styles?)

Parameters

originPoint (PricedData) Β· Starting point before the triangle begins. pA (PricedData) Β· First leg of the triangle. pB (PricedData) Β· Second leg of the triangle. pC (PricedData) Β· Third leg of the triangle. pD (PricedData) Β· Fourth leg of the triangle. pE (PricedData) Β· Final leg, completing the triangle before breakout. styles (ElliottTriangleStyleOverrides) Β· Visual options:

  • fillBackground (boolean) Β· Fill the triangle area.

  • transparency (number) Β· Transparency level for the fill (0–100).

  • showLabels (boolean) Β· Show labels A–E on each leg.

  • line (LinesLevels without coeff) Β· Style for triangle connectors (linestyle, linewidth, color).

  • background (RGBAColor | BaseColors) Β· Fill color for the body of the triangle.

Return Value

(string) Β· The drawing ID of the created Elliott Triangle Wave.

Example

Every 100 candles, draw a contracting Elliott Triangle with five pivots.

//@version=1
init = () => {
  indicator({ onMainPanel: true, format: 'inherit' });
};

onTick = () => {
  if (index % 100 === 0) { // draw every 100 bars
    // 1) Define six anchors (origin + A–E)
    const O = newPoint(time(120), high(120));
    const A = newPoint(time(100), low(100));
    const B = newPoint(time(85),  high(85));
    const C = newPoint(time(70),  low(70));
    const D = newPoint(time(50),  high(50));
    const E = newPoint(time(30),  low(30));

    // 2) Style setup
    const style = {
      fillBackground: true,
      transparency: 75,
      showLabels: true,
      line: { linestyle: 0, linewidth: 2, color: color.orange },
      background: color.rgba(255, 165, 0, 0.2)
    };

    // 3) Draw triangle wave
    elliottTriangleWave(O, A, B, C, D, E, style);
  }
};

Tips

  • Triangles usually form in wave 4 of an impulse or as part of a B wave correction.

  • They typically contract (lower highs and higher lows), but can also expand.

  • Look for a breakout after point E β€” often it’s a sharp move in the trend direction.

Warning

  • Avoid confusing triangles with random sideways chop. A proper Elliott triangle should have five clear legs labeled A–E.

Good Practice

  • Use a unique color (like orange) for triangles so they’re easy to distinguish from impulses and ABC corrections.

  • Confirm the breakout after point E with volume or momentum indicators.

Last updated