Back to blogOPENMARKET BLOG

Build Your Own Indicators in TypeScript with wrun

2 mins read

A custom Market HUD indicator built with wrun

wrun is live on OpenMarket. You can now write your own indicators in TypeScript syntax, right in the chart's editor, and see them draw on your chart.

Write it in the browser

Open the editor from the chart toolbar, press New indicator, and pick a starter or a blank tab. There is nothing to install. Press Run and the editor checks your code first, naming any mistake with its line and column. Once it compiles, your indicator draws on the chart and updates as new bars arrive.

Here is a complete indicator, a 20-period moving average with a Period setting:

param("period", 20, { min: 1, max: 200 });
output("sma", line, overlay, { color: "#2563eb", width: 2, description: "20-period simple moving average" });

let sma = new Sma(20);

function onStart(): void { sma = new Sma(i32(p_period())); }
function onBar(): void { out_sma(sma.update(bar.close())); }

Your indicators can read more than candles: the order book, the trade tape and liquidations are all there to build on. They can draw lines, boxes, labels, HUDs and heatmaps.

Get help from AI

Because wrun uses TypeScript syntax, AI assistants already know how to write it. Right-click an editor tab and pick Copy for LLM to copy the language rules, your code and any errors in one paste. Give that to any assistant, paste its answer back, and press Run. You can also ask Kata, the assistant inside OpenMarket, to build one for you.

If you have an existing Pine script, Convert from Pine turns it into a wrun indicator in a new tab and tells you what came across.

Test strategies

A wrun file can also be a strategy. Add a strategy declaration and the Run button becomes Backtest. The Strategy Tester shows the trades, the equity curve and the stats.

Alerts, sharing and selling

When an indicator is ready, publish it under your username. You choose who can use it: everyone, only the people you invite, or just you. Once it is published, anything it draws can trigger an alert.

Published indicators appear in the Indicators store, with Popular, Trending, New and Paid tabs and a page for each indicator. You can also sell your indicators on the Marketplace.

Get started

Read the guide at openmarket.xyz/wrun, or open the editor on your chart and write your first indicator.

© 2026 OpenMarket · Thalamus Technologies, Inc.. All rights reserved.