Skip to main content

Write your own indicator with Hyperprop Scripts

Build a custom indicator in the terminal, declare its inputs.

If the 30 built-in indicators do not do what you want, you can write your own. Hyperprop Scripts are custom indicators written in JavaScript, in an editor inside the terminal.

How a script works

You write a compute function that runs over the bars on the chart and returns what to plot. Plots can be drawn as a line or as a histogram.

A bundle of technical-analysis helpers is available so you are not rewriting the basics: sma, ema, rma, highest, lowest, change, stdev and atr.

Inputs build their own settings dialog

Declare an input in the script and Hyperprop generates the settings panel for it automatically. You do not build any interface yourself.

The available declarations are input.int, input.source, input.bool, input.color, input.string and input.select. If you have written Pine before, this will feel familiar, because it works the same way.

The result is that a length or a colour you exposed as an input becomes a normal, editable setting on the indicator, like any built-in one.

A runaway script cannot freeze your chart

Loops are rewritten when the script compiles so they carry a time guard. If a script runs longer than a one-second budget it throws an error and stops, instead of locking up the tab.

You can experiment without risking the terminal you are trading in.

Start from a built-in

The fastest way in is to open the legend on any built-in indicator and choose to view its source. They are written in the same language, so you get a working, readable example of exactly the thing you are trying to build.

Did this answer your question?