The editor

- Click Indicators → Custom indicator.
- Pick an example from the library or write a formula; the status line shows errors with their line number as you type.
- Choose On the price chart or In its own pane, then Save and add to chart.
- Copy code to share gives a code another Oyticker user can paste in Import code.

Language reference
| Element | Syntax |
|---|---|
| Price series | open, high, low, close, volume, hl2, hlc3, ohlc4, hlcc4, bar_index |
| Variables | basis = ema(close, 20) (one assignment per line) |
| Previous bars | close[1] is the previous close, x[n] the value n bars ago |
| Operators | + - * / % ^, comparisons > < >= <= == !=, and or not (or && || !), cond ? a : b |
| Plots | plot(x, "Title", "#hex color"), at most 8 per indicator |
| Levels | hline(70, "Title") |
| Constants | na, true, false, pi, e |
| Comments | // anything after two slashes |
| Function | Meaning |
|---|---|
sma(x, n) ema(x, n) wma(x, n) rma(x, n) hma(x, n) | Moving averages (rma = Wilder's) |
stdev(x, n) dev(x, n) | Standard deviation, mean absolute deviation |
highest(x, n) lowest(x, n) sum(x, n) cum(x) | Rolling extremes, sums |
change(x, n) roc(x, n) | Difference and % change over n bars |
rsi(x, n) atr(n) tr() vwap() | Built-in indicators (session VWAP) |
crossover(a, b) crossunder(a, b) | 1 on the bar a crosses above (below) b |
nz(x, v) max min abs sign sqrt log exp pow round | Utilities |
// On-Balance Volume, as in the library plot(cum(nz(sign(change(close))) * volume), "OBV") // Bandwidth of Bollinger Bands, in % basis = sma(close, 20) plot(100 * 4 * stdev(close, 20) / basis, "BB width %")
Limits and safety
- Formulas are parsed and evaluated by Oyticker, never executed as code: only the functions above exist, and nothing can access the page, your account or the network.
- Limits: 4,000 characters, 40 statements, lengths from 1 to 1,000 bars, at most 8 plots.
- Unavailable values (before enough bars exist, divisions by zero) are
naand are not drawn. - Saved formulas are stored in your browser for your account; they are not sent to Oyticker's servers.
Charts in this guide use simulated prices generated for illustration; levels and outcomes shown are examples, not observations of a real market. For information only, not investment advice.