Fibonacci extension
All indicators

LibraryMarket structure

Indicator

Fibonacci extension

Targets beyond the last swing leg: where the leg ends if it runs on 1.272, 1.618, 2 or 2.618 times its own length, measured from its start.

Market structureOn the price1 inputFib ext

How it is calculated

The leg as in fib_retracement: from the older of the last swing high and low to the newer. Each level is start plus ratio times (end minus start), so in an up leg the levels lie above the high and in a down leg below the low. leg is +1 for an up leg, -1 for a down leg.

Reference: Fibonacci extension of the last swing leg (#546)

How to read it

The levels move when a new swing is confirmed, length bars after its extreme, and hold until the next one. They are projections, not support or resistance that has been tested; nothing shows before the first swing high and low.

In a strategy

Take profit at a projection: a long opened in an up leg exits at ctx.ind("fib_extension", length=3).level_1618, or in parts at 1.272 and 1.618.

Inputs

InputTypeDefaultRange or choices
Swing bars each sidelengthWhole number3min 1, max 50

What it draws

LineDrawn as
1.272Steps
1.618Steps
2Steps
2.618Steps

Used in

No strategy template reads it yet.

OrionQuant