Skip to content
ChartDeck ChartScript docs Account Open the terminal

Templates

The list of ChartScript templates - about 50 short, commented scripts in 15 groups that you can open, read, change and save as your own.

A template is a short working script with comments that explain it. You open one, it becomes a new script of your own, and you change it. There are 52 of them in 15 groups, from an empty overlay to tables, drawings, alerts and ChartDeck's derivatives data.

My scripts in the Indicators dialog: Start from a template, with the search field, a chip per group and cards with a preview pictureMy scripts in the Indicators dialog: Start from a template, with the search field, a chip per group and cards with a preview picture

#Finding one

  1. Click Indicators in the top toolbar (or press /) and open the My scripts tab.
  2. Under your own scripts is Start from a template.
  3. Type in Search templates to search the names and descriptions, or click a group chip such as Momentum to see one group. All shows every template again. The counter on the right says how many are shown.

Each card has the template's name, one line about what it does, its group, and a small picture. The picture is the template itself, run on sample bars and drawn the way the chart draws it. A few templates read data that the sample bars do not have (open interest, funding, basis, the long / short ratio, seconds bars); their cards show a plain mark instead of a picture.

You can also reach the list from the editor: New in its tools row lists the first few templates, and All templates… at the end of that menu opens the whole list.

#Using one

Click the card. The dialog closes and the editor opens with the template's code as a new, unsaved script: nothing is stored yet, and the template itself never changes. If the editor already holds unsaved changes, it asks before replacing them.

  • Save (Ctrl+S) asks for a name the first time, with the template's title filled in. After that the script is in My scripts like any other.
  • Add to chart (Ctrl+Enter) saves it and puts it on the active chart.
  • A template counts toward your plan's number of scripts only once you save it.

Every template compiles without an error or a warning as it is, so anything the editor underlines afterwards comes from your own changes.

#The templates

#Blank starts

Nearly empty scripts: the smallest thing that draws, for when you already know what you want to write.

TemplateWhat it does
Blank overlayAn empty script drawn over the price, with one input and one plot to start from.
Blank oscillatorAn empty script in its own pane below the chart, with a zero line.
Blank tableA small table in the corner of the chart to build a dashboard from.
Blank drawingOne label that follows the newest bar, to start drawing from.

#Trend

Averages and trend followers drawn over the price.

TemplateWhat it does
EMA crossTwo EMAs with markers where they cross, and an alert condition for the bullish cross.
EMA ribbonFour EMAs at evenly spaced lengths, colored by trend, with a fill between the outer two.
Trend backgroundA moving average with the background tinted by the side the price is on.
SupertrendA volatility trailing stop that flips when the trend turns, with markers and an alert.
Hull moving averageA fast, smooth average colored by its own slope.
Moving average of your choiceOne average whose type, length and source are inputs.

#Momentum

Oscillators in their own pane.

TemplateWhat it does
RSI with bandsRSI in its own pane with 70 / 30 bands and a background tint when it is outside them.
MACDMACD and signal lines with a histogram in four shades.
Stochastic RSIWhere the RSI sits in its recent range, with %K and %D.
Rate of changePercent change over N bars as a two-color baseline area.
Momentum lollipopsMomentum drawn as stems with a dot, colored by direction.

#Volatility

Bands and channels built from how far the price moves.

TemplateWhat it does
Bollinger Bands with squeezeBollinger Bands that highlight when they are at their narrowest.
Keltner channelAn EMA with bands of average true range.
ATR stop bandsStepped stop levels a multiple of the average true range from the close.
Donchian breakoutThe highest high and lowest low of N bars, with breakout markers and alerts.

#Volume

What the traded volume says.

TemplateWhat it does
Volume spikesVolume columns that highlight bars far above the average, with an alert.
VWAP with bandsThe daily volume-weighted average price with standard deviation bands.
On-balance volumeOBV colored by the side of its average it is on.

#Structure and levels

Swing points, yesterday's levels, sessions and zones.

TemplateWhat it does
Pivot highs and lowsLabels on swing highs and lows, and the latest of each as a level.
Previous day high and lowYesterday's high, low and close as levels, with alerts when they break.
Session range boxA box around the high and low of a session you choose.
Fair value gapsBoxes on three-bar gaps the price left without trading.
Simple order blocksMarks the last opposite candle before a strong move as a zone.

#Derivatives data

Open interest, funding, basis, positioning and liquidations: ChartDeck's own series, read like close. See ChartDeck data for what each plan includes.

TemplateWhat it does
Open interest changePercent change of open interest over N bars. On every plan; how far back depends on your plan.
Funding rateThe funding rate with extremes highlighted and an alert. On every plan; how far back depends on your plan.
Perpetual basisHow far the perpetual trades from spot. On every plan; how far back depends on your plan.
Long / short ratioAccounts long against short, all traders and top traders. Needs Pro or Elite.
LiquidationsLiquidated longs and shorts per bar, with a spike alert. Needs Pro or Elite.

#Order flow

Buy volume against sell volume, from the taker-buy volume that comes with the chart's bars.

TemplateWhat it does
Volume deltaBuy volume minus sell volume on each bar.
Cumulative volume deltaThe running total of delta, restarted each day.
Buy share of volumeThe share of volume bought at the ask, around a 50% line.

#Timeframes and markets

Values from another timeframe or another market. Each request counts toward your plan's extra timeframes or markets per script; see Other timeframes and markets.

TemplateWhat it does
Higher-timeframe EMAAn EMA from a higher timeframe shown on this chart, without repainting.
Higher-timeframe rangeThe forming higher-timeframe high and low as range bars.
Performance against BitcoinThis market and Bitcoin as percent change, and the difference.
10-second pulseReads 10-second bars from a minute chart. Needs Plus, Pro or Elite.

#Alerts

Scripts whose point is an alert. See Alerts.

TemplateWhat it does
Price level alertsNo drawing: two alert conditions for when the price crosses a level you choose.
RSI alertsFour alert conditions on RSI levels you choose.
Alert with live valuesAn alert message that carries the price and the size of the move.

#Tables

Numbers in a table in a corner of the chart.

TemplateWhat it does
Market dashboardTrend, RSI, volatility and volume in a small table.
Trend on four timeframesAbove or below the 50 EMA on 15m, 1h, 4h and 1D, in a table.

#Drawings

Labels, lines and boxes. See Drawings.

TemplateWhat it does
Last price labelA label beside the newest bar with the price and the day's change.
Swing linesLines joining each swing high and low to the one before.
Recent range boxA box around the high and low of the last N bars.

#Inputs and styling

Settings a script offers, and settings that change how it looks.

TemplateWhat it does
Inputs and stylingGrouped inputs of many kinds, and inputs that set a plot's color, width and dashes.

#State and patterns

Values a script keeps from bar to bar.

TemplateWhat it does
Up-bar streakCounts consecutive up bars with state and keeps the best streak so far.
Updates per barCounts how often the price changed while each bar was open, with live state.

#Plot styles

The plot styles side by side. See Plots.

TemplateWhat it does
Plot styles galleryBaseline, smooth, markers, lollipop and range bars side by side.
Smooth swing curveA smooth curve through swing highs and another through swing lows.

#What a plan changes

The templates are the same on every plan, and every one of them opens, saves and runs on every plan. What differs is the data some of them read:

  • Long / short ratio and Liquidations read series that are part of Pro and Elite. On other plans their plots stay empty and the legend says why.
  • 10-second pulse reads seconds bars, which are part of Plus, Pro and Elite.
  • Open interest change, Funding rate and Perpetual basis work on every plan; how far back their data goes depends on your plan.
  • Templates in Timeframes and markets, and Trend on four timeframes, ask for other timeframes or another market. The number of those a script may ask for depends on your plan.

The exact numbers are on the Limits page.

#Where to go next

  • Your first script walks through opening a template, changing it and saving it.
  • Plots explains every plot style the templates use.
  • Editor tour covers the editor part by part.

The ChartScript documentation is in English for now; translations will follow.