Market structure reference

All 8 market structure in AlgoBarsX, each with its parameters, defaults, ranges and an example: highest, lowest, pivots, swing_high, swing_low, fractals, zigzag, support_resistance.

highest lowest pivots swing_high swing_low fractals zigzag support_resistance

highest(source = high, length = 20)→ like source#

Highest value over the last bars.

Parameters

NameTypeDefaultRangeWhat it is
sourceseries<number>highSeries to calculate from.
lengthint201 to 5000Number of bars in the calculation.
Example
top = highest(high, 20)
strategyindicatoralertlibrarysince 1.0

lowest(source = low, length = 20)→ like source#

Lowest value over the last bars.

Parameters

NameTypeDefaultRangeWhat it is
sourceseries<number>lowSeries to calculate from.
lengthint201 to 5000Number of bars in the calculation.
Example
bottom = lowest(low, 20)
strategyindicatoralertlibrarysince 1.0

pivots(left = 5, right = 5, on = bars())→ Pivots#

Confirmed pivot highs and lows; each fires on its confirmation bar, never the pivot bar.

Parameters

NameTypeDefaultRangeWhat it is
leftint51 to 500Bars to the left.
rightint51 to 500Bars to the right.
onBarSetbars()Bars to calculate on; defaults to the script's own bars.

Outputs, read with a dot

NameTypeWhat it is
highseries<price>Latest confirmed pivot high.
lowseries<price>Latest confirmed pivot low.
Example
pv = pivots(left: 5, right: 5)
strategyindicatoralertlibrarysince 1.0

swing_high(left = 5, right = 5, on = bars())→ series<price>#

Latest confirmed swing high.

Parameters

NameTypeDefaultRangeWhat it is
leftint51 to 500Bars to the left.
rightint51 to 500Bars to the right.
onBarSetbars()Bars to calculate on; defaults to the script's own bars.
Example
last_swing_high = swing_high(left: 5, right: 5)
strategyindicatoralertlibrarysince 1.0

swing_low(left = 5, right = 5, on = bars())→ series<price>#

Latest confirmed swing low.

Parameters

NameTypeDefaultRangeWhat it is
leftint51 to 500Bars to the left.
rightint51 to 500Bars to the right.
onBarSetbars()Bars to calculate on; defaults to the script's own bars.
Example
last_swing_low = swing_low(left: 5, right: 5)
strategyindicatoralertlibrarysince 1.0

fractals(periods = 2, on = bars())→ Fractals#

Williams fractals.

Parameters

NameTypeDefaultRangeWhat it is
periodsint21 to 50Bars on each side.
onBarSetbars()Bars to calculate on; defaults to the script's own bars.

Outputs, read with a dot

NameTypeWhat it is
upseries<bool>Up fractal confirmed.
downseries<bool>Down fractal confirmed.
Example
fr = fractals(2)
strategyindicatoralertlibrarysince 1.0

zigzag(deviation = 5%, depth = 10, on = bars())→ list<Swing>#

Zigzag swing points.

Parameters

NameTypeDefaultRangeWhat it is
deviationpercent5%Smallest reversal.
depthint101 to 500Fewest bars between points.
onBarSetbars()Bars to calculate on; defaults to the script's own bars.
Example
swings = zigzag(deviation: 5%, depth: 10)
strategyindicatoralertlibrarysince 1.0

support_resistance(length = 200, touches = 2, on = bars())→ list<Level>#

Support and resistance levels.

Parameters

NameTypeDefaultRangeWhat it is
lengthint2001 to 5000Bars to scan.
touchesint21 to 100Fewest touches for a level.
onBarSetbars()Bars to calculate on; defaults to the script's own bars.
Example
key_levels = support_resistance(200, touches: 2)
strategyindicatoralertlibrarysince 1.0

Try this in the Terminal. AlgoBars is free: $0 a month, no card needed.

Create my free account