Your First Indicator
Write, run and tune a Momentum Ribbon indicator in AlgoBeamScript.
Create a file with the extension .algo and start it with a version pragma. The pragma pins the language edition so a script written today keeps compiling after the language moves on. The next line declares what kind of script this is: indicator draws on a chart, strategy also places simulated orders.
Inputs come next by convention. Every input.* call creates a control in the settings panel and returns the value the user picked, so the same line both configures the script and documents it. Give every input a label and sensible bounds — a length of zero will not do anything useful and minval stops it from ever being tried.
The body computes series. The example blends a relative strength reading with a pair of exponential moving averages and a crude slope term, then reduces those three into two booleans: bull and bear. Keeping the signal logic in named booleans rather than inline inside plot calls makes it far easier to reuse the same condition for an alert later.
Output is declarative. Each plot registers a line with a title, colour and width; fill shades the space between two plotted series; hline draws a static level; and alert.when registers a condition the platform can fire on. Anything given pane = lower is drawn in a separate pane below price instead of on top of it.
Run it with the CLI or load it in the chart settings panel. Tune the RSI length and the bull threshold and watch the ribbon change character — a shorter length flips more often and generates more alerts, a longer one lags but survives chop. When the behaviour feels right, Your First Backtest shows how to attach orders to it.