# Drawing

plot, level, fill, mark, bar_color, background; where a script draws.

| Call | Does |
| --- | --- |
| `plot(value, "title", color = c, width = 1-4, style = line \| bars \| dots \| steps, offset = n)` | Draws a value (`offset` shifts it n bars ahead, or back) |
| `level(a, b, ...)` | Grey dashed lines at fixed values |
| `fill(a, b, color = c, opacity = 0-100, offset = n)` | Fills between two lines |
| `mark(condition, "text {name}", where = above \| below, shape = arrow \| dot, color = c, at = price, offset = -n)` | Marks the bars where a yes/no is true; with `at` a label at a price |
| `bar_color(c)` | Colors the candles per bar |
| `background(c)` | Colors behind each bar |
| `alert(condition, "message {name}")` | Alerts when a bar closes with it true |
| `name("title", where = chart \| pane)` | Names the script; where it draws |

Where it draws, unless `name(..., where = ...)` says: if everything plotted is a price (moving averages, highs and lows, bands, `close` plus or minus a price distance) it draws on the chart; anything else (RSI, volume, ATR, MACD) gets its own pane. A script with only marks or coloring draws on the chart.

Each drawing call goes on its own line. A plot's defaults: a line in the next palette color, width 1, titled with the formula as written.

See also: [plot](/documentation/vex/reference/drawing#plot), [fill](/documentation/vex/reference/drawing#fill), [mark](/documentation/vex/reference/drawing#mark), [Colors](/documentation/vex/colors)
