Indicators · Custom

Custom indicators

Custom indicators let you write your own formulas in a small language close to TradingView's Pine Script. Formulas compute numbers only: they cannot run code, read data or send anything, which makes indicators shared by other users safe to import.

What it's for
  • Build indicators that Oyticker does not offer, in a formula language close to Pine Script.
  • Save them, reuse them and share them safely as code.
Plus and Pro toolTry it in Analyze
Pane
Price chart or separate pane
Plan
Plus and Pro
Library
Hull, Keltner, Donchian, OBV, CCI, Williams %R, Momentum, ROC
Sharing
Copy and import as code

The editor

Oyticker custom indicator editor with the Keltner Channels formula and the library
The editor: a name, where to display it, the formula with live validation, and a library of ready-made indicators. Formulas can be saved and shared as code.
  1. Click Indicators → Custom indicator.
  2. Pick an example from the library or write a formula; the status line shows errors with their line number as you type.
  3. Choose On the price chart or In its own pane, then Save and add to chart.
  4. Copy code to share gives a code another Oyticker user can paste in Import code.
Keltner Channels custom indicator on the price chart
The Keltner Channels example on the chart: an EMA 20 with bands at 2 × ATR(10).

Language reference

ElementSyntax
Price seriesopen, high, low, close, volume, hl2, hlc3, ohlc4, hlcc4, bar_index
Variablesbasis = ema(close, 20) (one assignment per line)
Previous barsclose[1] is the previous close, x[n] the value n bars ago
Operators+ - * / % ^, comparisons > < >= <= == !=, and or not (or && || !), cond ? a : b
Plotsplot(x, "Title", "#hex color"), at most 8 per indicator
Levelshline(70, "Title")
Constantsna, true, false, pi, e
Comments// anything after two slashes
FunctionMeaning
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 roundUtilities
// 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 na and 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. Educational content only, not investment advice.

Custom indicators: write your own formulas in Oyticker's Pine-like language | Oyticker