All 26 drawing commands in AlgoBarsX, each with its parameters, defaults, ranges and an example: plot, fill, hline, mark, label, line, box, table, bar_color, background and 16 more.
plot fill hline mark label line box table bar_color background pane polygon polyline curve channel profile heatmap cells candles fib pitchfork arrow icon image tooltip dashboard
plot <series> [options]#
Draw a series.
Arguments
| Name | Type | Default | What it is |
|---|
series | series<number> | required | Values to draw. |
Options
| Name | Type | Default | Range | What it is |
|---|
style | string | line | | line, step, area, histogram, columns, circles or cross. |
color | color | blue | | Color. |
width | int | 1 | 1 to 10 | Line width in pixels. |
pane | string | price | | price, new or a named pane. |
Where it goes At the top level of an indicator or strategy.
plot ema(close, 20) as fast, color: green, width: 2
fill <a> <b> [options]#
Fill between two plots or levels.
Arguments
| Name | Type | Default | What it is |
|---|
a | series<number> | required | First edge. |
b | series<number> | required | Second edge. |
Options
| Name | Type | Default | What it is |
|---|
color | color | blue | Color. |
Where it goes At the top level of an indicator or strategy.
fill ema(close, 20), ema(close, 50), color: green.fade(80)
hline <value> [options]#
Horizontal level.
Arguments
| Name | Type | Default | What it is |
|---|
value | price | required | Level. |
Options
| Name | Type | Default | What it is |
|---|
style | string | dashed | solid, dashed or dotted. |
color | color | gray | Color. |
Where it goes At the top level of an indicator or strategy.
hline 70, style: dashed, color: red
mark <shape> [options]#
Marker on bars where a condition is true.
Arguments
| Name | Type | Default | What it is |
|---|
shape | string | required | Built-in shape, emoji or SVG path. |
Options
| Name | Type | Default | What it is |
|---|
at | string | price | below | above, below or a price. |
when | bool | true | Where to draw. |
color | color | blue | Color. |
size | string | small | tiny, small, normal or large. |
Where it goes At the top level of an indicator or strategy.
mark arrow_up, at: below, when: crosses_above(close, ema(close, 20))
label <text> [options]#
Text at a bar and price.
Arguments
| Name | Type | Default | What it is |
|---|
text | string | required | Text. |
Options
| Name | Type | Default | What it is |
|---|
at | tuple<bar | time, price> | required | Bar and price. |
style | string | normal | Label style. |
color | color | blue | Color. |
Where it goes Anywhere a drawing statement is allowed.
label "Entry", at: (bar.index, high)
line [options]#
Trend line or ray.
Options
| Name | Type | Default | Range | What it is |
|---|
from | tuple<bar | time, price> | required | | Start point. |
to | tuple<bar | time, price> | required | | End point. |
extend | string | none | | none, left, right or both. |
color | color | blue | | Color. |
width | int | 1 | 1 to 10 | Line width in pixels. |
Where it goes Anywhere a drawing statement is allowed.
line from: (bar.index - 20, low), to: (bar.index, low), extend: right
box [options]#
Rectangle or zone.
Options
| Name | Type | Default | What it is |
|---|
id | string | automatic | Id for updating the same box later. |
from | tuple<bar | time, price> | required | One corner. |
to | tuple<bar | time, price> | required | Opposite corner. |
color | color | blue | Color. |
border | color | none | Border color. |
Where it goes Anywhere a drawing statement is allowed.
box from: (bar.index - 10, high), to: (bar.index, low), color: blue.fade(85)
table [options]#
On-chart table.
Options
| Name | Type | Default | What it is |
|---|
position | string | top_right | Corner or edge of the chart. |
rows | list<list<string>> | required | Cell text by row. |
Where it goes At the top level of an indicator or strategy.
table position: top_right, rows: [["RSI", "{rsi(close, 14):0}"]]
bar_color <color>#
Recolor price bars.
Arguments
| Name | Type | Default | What it is |
|---|
color | color | required | Bar color. |
Where it goes At the top level of an indicator or strategy.
bar_color if close > open then green else red
background <color> [options]#
Shade the background.
Arguments
| Name | Type | Default | What it is |
|---|
color | color | required | Background color. |
Options
| Name | Type | Default | What it is |
|---|
when | bool | true | Where to shade. |
Where it goes At the top level of an indicator or strategy.
background red.fade(90), when: rsi(close, 14) > 70
pane <name> [options]#
Declare a named pane shared by several plots.
Arguments
| Name | Type | Default | What it is |
|---|
name | string | required | Pane name. |
Options
| Name | Type | Default | What it is |
|---|
height | percent | 25% | Share of the chart height. |
Where it goes At the top level of an indicator.
pane "Oscillators", height: 30%
polygon [options]#
Closed shape.
Options
| Name | Type | Default | What it is |
|---|
points | list<tuple<bar | time, price>> | required | Corner points. |
fill | color | none | Fill color. |
border | color | blue | Border color. |
Where it goes Anywhere a drawing statement is allowed.
polygon points: [(bar.index - 5, high), (bar.index, low), (bar.index - 5, low)], fill: blue.fade(80)
polyline [options]#
Open multi-segment line.
Options
| Name | Type | Default | Range | What it is |
|---|
points | list<tuple<bar | time, price>> | required | | Points in order. |
color | color | blue | | Color. |
width | int | 1 | 1 to 10 | Line width in pixels. |
Where it goes Anywhere a drawing statement is allowed.
polyline points: [(bar.index - 10, low), (bar.index - 5, high), (bar.index, low)]
curve [options]#
Smoothed curve through points.
Options
| Name | Type | Default | Range | What it is |
|---|
points | list<tuple<bar | time, price>> | required | | Points in order. |
smooth | number | 0.5 | 0 to 1 | Smoothing from 0 to 1. |
color | color | blue | | Color. |
Where it goes Anywhere a drawing statement is allowed.
curve points: [(bar.index - 10, low), (bar.index - 5, high), (bar.index, low)], smooth: 0.5
channel [options]#
Channel between two series with a fill.
Options
| Name | Type | Default | What it is |
|---|
upper | series<price> | required | Upper edge. |
lower | series<price> | required | Lower edge. |
fill | fill | blue.fade(85) | Fill color or gradient. |
Where it goes At the top level of an indicator or strategy.
channel upper: bollinger(close).upper, lower: bollinger(close).lower, fill: blue.fade(85)
profile [options]#
Horizontal histogram on the price axis (volume profile, market profile).
Options
| Name | Type | Default | Range | What it is |
|---|
rows | int | 24 | 2 to 1000 | Price rows. |
range | string | visible | | visible, session or fixed. |
side | string | right | | left or right. |
value_area | percent | 70% | | Value area share. |
Where it goes At the top level of an indicator.
profile rows: 24, range: session, side: right
heatmap [options]#
Price-by-time heatmap.
Options
| Name | Type | Default | What it is |
|---|
cells | list<Cell> | required | Cells with bar, price and value. |
palette | string | "thermal" | Color palette. |
Where it goes At the top level of an indicator.
heatmap cells: liquidity_cells, palette: "thermal"
cells [options]#
Cell grid inside each bar (footprint style).
Options
| Name | Type | Default | What it is |
|---|
rows | list<list<string>> | required | Cell text by row. |
columns | int | 2 | Columns per bar. |
Where it goes At the top level of an indicator.
cells rows: footprint_rows, columns: 2
candles [options]#
Custom candles in any pane.
Options
| Name | Type | Default | What it is |
|---|
open | series<number> | required | Open. |
high | series<number> | required | High. |
low | series<number> | required | Low. |
close | series<number> | required | Close. |
color | color | blue | Color. |
pane | string | new | price, new or a named pane. |
Where it goes At the top level of an indicator.
candles open: open - close_of(GBPUSD), high: high - close_of(GBPUSD), low: low - close_of(GBPUSD), close: close - close_of(GBPUSD)
fib [options]#
Fibonacci retracement or extension.
Options
| Name | Type | Default | What it is |
|---|
from | tuple<bar | time, price> | required | Swing start. |
to | tuple<bar | time, price> | required | Swing end. |
levels | list<number> | [0.236, 0.382, 0.5, 0.618, 0.786] | Levels to draw. |
Where it goes Anywhere a drawing statement is allowed.
fib from: (bar.index - 50, lowest(low, 50)), to: (bar.index, highest(high, 50))
pitchfork [options]#
Andrews pitchfork.
Options
| Name | Type | Default | What it is |
|---|
points | list<tuple<bar | time, price>> | required | Three anchor points. |
Where it goes Anywhere a drawing statement is allowed.
pitchfork points: [(bar.index - 30, low), (bar.index - 20, high), (bar.index - 10, low)]
arrow [options]#
Arrow between two points.
Options
| Name | Type | Default | What it is |
|---|
from | tuple<bar | time, price> | required | Tail. |
to | tuple<bar | time, price> | required | Head. |
color | color | blue | Color. |
Where it goes Anywhere a drawing statement is allowed.
arrow from: (bar.index - 5, high), to: (bar.index, close)
icon <name> [options]#
Icon glyph.
Arguments
| Name | Type | Default | What it is |
|---|
name | string | required | Icon name. |
Options
| Name | Type | Default | What it is |
|---|
at | tuple<bar | time, price> | required | Bar and price. |
color | color | blue | Color. |
Where it goes Anywhere a drawing statement is allowed.
icon "flag", at: (bar.index, high)
image <asset> [options]#
Small image uploaded with the script.
Arguments
| Name | Type | Default | What it is |
|---|
asset | string | required | Asset name. |
Options
| Name | Type | Default | Range | What it is |
|---|
at | tuple<bar | time, price> | required | | Bar and price. |
width | int | 24 | 4 to 512 | Width in pixels. |
Where it goes Anywhere a drawing statement is allowed.
image "logo", at: (bar.index, high), width: 24
dashboard [options]#
Panel pinned to the screen that stays put while the chart scrolls.
Options
| Name | Type | Default | What it is |
|---|
position | string | top_right | Corner or edge of the screen. |
rows | list<list<string>> | required | Cell text by row. |
Where it goes At the top level of an indicator or strategy.
dashboard position: top_right, rows: [["Trend", "up"]]