Smart money concepts reference
All 7 smart money concepts in AlgoBarsX, each with its parameters, defaults, ranges and an example: order_blocks, fair_value_gaps, break_of_structure, change_of_character, liquidity_sweeps, premium_discount, optimal_trade_entry.
order_blocks fair_value_gaps break_of_structure change_of_character liquidity_sweeps premium_discount optimal_trade_entry
order_blocks(length = 50, new_only = false, on = bars())→ list<Zone>#
Order blocks as zones with price bounds, formation time and status.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
length | int | 50 | 1 to 5000 | Bars to scan. |
new_only | bool | false | Only blocks that formed on this bar. | |
on | BarSet | bars() | Bars to calculate on; defaults to the script's own bars. |
blocks = order_blocks(50, new_only: true)strategyindicatoralertlibrarysince 1.0
fair_value_gaps(length = 50, min_size = 0, new_only = false, on = bars())→ list<Zone>#
Fair value gaps as zones.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
length | int | 50 | 1 to 5000 | Bars to scan. |
min_size | price | 0 | Smallest gap to include. | |
new_only | bool | false | Only gaps that formed on this bar. | |
on | BarSet | bars() | Bars to calculate on; defaults to the script's own bars. |
gaps = fair_value_gaps(50, min_size: 0)strategyindicatoralertlibrarysince 1.0
break_of_structure(direction = both, swing_length = 5, on = bars())→ series<bool>#
True on the bar structure breaks.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
direction | string | both | up, down or both. | |
swing_length | int | 5 | 1 to 100 | Swing size in bars. |
on | BarSet | bars() | Bars to calculate on; defaults to the script's own bars. |
bos = break_of_structure(direction: up)strategyindicatoralertlibrarysince 1.0
change_of_character(direction = both, swing_length = 5, on = bars())→ series<bool>#
True on the bar character changes.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
direction | string | both | up, down or both. | |
swing_length | int | 5 | 1 to 100 | Swing size in bars. |
on | BarSet | bars() | Bars to calculate on; defaults to the script's own bars. |
choch = change_of_character(direction: down)strategyindicatoralertlibrarysince 1.0
liquidity_sweeps(length = 20, on = bars())→ series<bool>#
True on the bar a prior high or low is swept and rejected.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
length | int | 20 | 1 to 5000 | Number of bars in the calculation. |
on | BarSet | bars() | Bars to calculate on; defaults to the script's own bars. |
swept = liquidity_sweeps(20)strategyindicatoralertlibrarysince 1.0
optimal_trade_entry(swing_length = 5, low = 62%, high = 79%, on = bars())→ Zone#
Optimal trade entry zone of the latest swing.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
swing_length | int | 5 | 1 to 100 | Swing size in bars. |
low | percent | 62% | Shallow retracement. | |
high | percent | 79% | Deep retracement. | |
on | BarSet | bars() | Bars to calculate on; defaults to the script's own bars. |
ote = optimal_trade_entry(swing_length: 5)strategyindicatoralertlibrarysince 1.0