Skip to content

Build

Technical indicators

Every common indicator, readable as source and callable in one line.

Cloud9Trader ships sixty-seven technical indicators, from moving averages such as the Hull MA, RSI, MACD, Bollinger Bands, VWAP and ADX to the Ichimoku Cloud, Supertrend and the Vortex Indicator. The same indicator gives the same values in an algorithm, a backtest, a live session and on a chart. You can also write your own.

  • Use them in algorithms. Call an indicator by its key with its settings, such as sma(20) or rsi(14). Use another timeframe with H1.rsi(14), or another instrument with INSTRUMENTS["EUR_USD:OANDA"].macd(12, 26, 9). Values update at each bar close, and the indicator is warmed up with prices from before your start date so it has a value from the first bar.
  • Draw them on charts. The chart’s Indicators panel lists Overlays, drawn on the price (such as moving averages and Bollinger Bands), and Studies, drawn on their own axis below it (such as RSI and MACD), plus your Custom indicators.
  • Read the source. Each built-in indicator is a short JavaScript file you can open read-only from the Indicators list. The indicator catalogue has a page for each one: what it measures, its formula as the code computes it, a chart, and an algorithm example.
  • Write your own. Create an indicator in the Indicators list and write it in the same editor as an algorithm, with the bar’s open, high, low, close and volume in scope. New accounts start with one example, Simple Moving Average. Writing your own indicators explains how one runs and what to return for the chart you want.
  • Test it. New Test runs your indicator over an instrument, interval and date range and shows its output on a chart with its log.

An indicator runs once per bar on the bars your algorithm or chart uses. Each distinct indicator and set of settings is calculated once and shared, so calling sma(20) in several places costs no more than calling it once.

  • An algorithm can use at most 10 distinct indicator configurations (an indicator with one set of settings). sma(20) and sma(50) count as two.
  • Indicator settings are checked against each indicator’s allowed range, and the run fails if they are out of range.
  • A test of a custom indicator stops after 30 seconds.
  • A custom indicator that returns something that is not a number looks fine on a chart, where the point is skipped, but fails a test, a backtest or a live session. Test it before you use it in an algorithm.
  • No indicator predicts the price. See Indicators explained.

Indicators are available on every plan. Running them inside a backtest or session uses that run’s compute units or session.