[{"data":1,"prerenderedAt":21},["ShallowReactive",2],{"blog-post-typescript-indicators-launch":3,"blog-adjacent-typescript-indicators-launch":14},{"slug":4,"_path":5,"title":6,"description":7,"publishedAt":8,"readingTime":9,"thumbnail":10,"author":11,"tags":12,"content":13},"typescript-indicators-launch","/blog/typescript-indicators-launch","Build Your Own Indicators in TypeScript with wrun","wrun lets you write your own indicators and strategies in TypeScript syntax, run them on your chart, and share or sell them on OpenMarket.","2026-10-06","2 mins","/public/images/news/typescript-indicators.png","OpenMarket Team",[],"![A custom Market HUD indicator built with wrun](/public/images/news/typescript-indicators.png)\n\nwrun 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.\n\n## Write it in the browser\n\nOpen 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.\n\nHere is a complete indicator, a 20-period moving average with a Period setting:\n\n```typescript\nparam(\"period\", 20, { min: 1, max: 200 });\noutput(\"sma\", line, overlay, { color: \"#2563eb\", width: 2, description: \"20-period simple moving average\" });\n\nlet sma = new Sma(20);\n\nfunction onStart(): void { sma = new Sma(i32(p_period())); }\nfunction onBar(): void { out_sma(sma.update(bar.close())); }\n```\n\nYour 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.\n\n## Get help from AI\n\nBecause 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.\n\nIf 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.\n\n## Test strategies\n\nA 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.\n\n## Alerts, sharing and selling\n\nWhen 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.\n\nPublished 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.\n\n## Get started\n\nRead the guide at [openmarket.xyz/wrun](https://openmarket.xyz/wrun), or open the editor on your chart and write your first indicator.",{"previousPost":15,"nextPost":18},{"slug":16,"title":17},"cme-futures-launch","CME Futures and Order Flow on OpenMarket",{"slug":19,"title":20},"phone-app-launch","The OpenMarket App Is on Google Play",1796148305903]