# OpenMarket wrun > wrun is OpenMarket's engine for chart indicators: each indicator is one file in TypeScript syntax, compiled to WebAssembly. You write it in the chart's editor, Run compiles it in your browser and draws it on the chart, and Publish puts a version on the OpenMarket registry for everyone, the people you invite, or just you. A published indicator runs in each reader's browser, or on OpenMarket's servers when its code never leaves OpenMarket, and alerts on it run in OpenMarket's cloud. The sections, in reading order: getting started, core concepts, the settings dialog a declared setting draws, presentation (style anything, plotting, styling, drawings, cards, the legend, labels, HUD and hover cards), the function library, a cookbook of complete indicators, FAQ, strategies and the Strategy Tester, and the reference pages (quick reference, declarations, limits, limitations, symbol format, versions). ## Getting Started - **Intro —** [What is wrun](https://openmarket.xyz/wrun/getting-started/introduction.md): wrun is OpenMarket's engine for your own market logic. Write an indicator in TypeScript syntax, and wrun runs it on every bar of the real market, compiled to… - **Intro —** [Your first indicator](https://openmarket.xyz/wrun/getting-started/primer-first-indicator.md): From an empty editor to a published indicator with an alert, in six steps. Run the Moving Average starter, grow it into an EMA crossover with a mark on every… - **Intro —** [The editor](https://openmarket.xyz/wrun/getting-started/the-editor.md): The chart's editor is where you write a wrun indicator: New indicator starts a file in TypeScript syntax, Run compiles it in your browser and draws it on the… - **Intro —** [Write it with AI](https://openmarket.xyz/wrun/getting-started/write-with-ai.md): Any AI assistant can write wrun. It is TypeScript syntax, which assistants have read a great deal of, and the editor's compiler checks every draft before… - **Intro —** [wrun vs Pine](https://openmarket.xyz/wrun/getting-started/wrun-vs-pine.md): Pine works from candles: it runs on TradingView's servers and draws lines, labels and boxes on the chart. A wrun indicator gets the market under the candles.… ## Core Concepts - **Reference —** [Execution model](https://openmarket.xyz/wrun/core-concepts/execution-model.md): A wrun indicator is a function the host calls once per bar, oldest bar first, with state that lives between calls in module-level variables. This page is the… - **Reference —** [Named streams](https://openmarket.xyz/wrun/core-concepts/named-streams.md): Multi-output indicators like Bollinger bands, MACD, and the stochastic produce several lines at once. In a wrun indicator each stream is an output of its own… - **Reference —** [Repainting](https://openmarket.xyz/wrun/core-concepts/repainting.md): What repainting is, why it breaks backtests, and why a wrun indicator does not repaint by construction: onBar() sees one bar and nothing later, a higher… - **Reference —** [What you can read](https://openmarket.xyz/wrun/core-concepts/what-you-can-read.md): A wrun indicator reads the market under the candles. Every level of the order book, buy and sell volume as the exchange tagged each trade, volume at each price… - **Reference —** [Data sources](https://openmarket.xyz/wrun/core-concepts/data-sources.md): The market data a wrun indicator can read on the chart: the sources the chart serves, the fields and knobs each one takes, what each value means, and the… - **Reference —** [Multi-timeframe](https://openmarket.xyz/wrun/core-concepts/multi-timeframe.md): Read higher timeframes from any wrun indicator on the chart, three ways: fold the chart's own bars into buckets on time.bar_open_sec, confirming a candle only… - **Reference —** [Multi-source and aggregation](https://openmarket.xyz/wrun/core-concepts/multi-source.md): One indicator can read several data types and markets at once: the other feeds of the chart's market, other markets' candles, and a sum across venues. - **Reference —** [Time and sessions](https://openmarket.xyz/wrun/core-concepts/time-and-sessions.md): Read the current bar's clock and trading session from the time source: hour, day of week, day of month, month, year, and session predicates, all in UTC, all as… - **Reference —** [Data types](https://openmarket.xyz/wrun/core-concepts/data-types.md): The types a wrun indicator is built from. The file is AssemblyScript, TypeScript syntax over fixed-width numbers, so every value has a declared width and the… - **Reference —** [Type system](https://openmarket.xyz/wrun/core-concepts/type-system.md): A comprehensive guide to the wrun type system: static typing, how types are inferred from literals, explicit casts, the per-bar value (there is no series type)… - **Reference —** [Variables: locals, module state, and history](https://openmarket.xyz/wrun/core-concepts/core-variables.md): Variable declaration and bar-state behavior in a wrun indicator: what a local in onBar() is, what a module-level variable is, and how a value with history is… - **Reference —** [Missing values (NaN)](https://openmarket.xyz/wrun/core-concepts/na-and-scalar-types.md): NaN is a wrun indicator's "no value here": a TA class that has not warmed up yet, a sparse source with no observation on this bar, a ratio with a zero… - **Reference —** [Collections](https://openmarket.xyz/wrun/core-concepts/collections.md): Arrays and maps in a wrun indicator, the loops that do the work of the reducer methods, sorting with a comparator, and the two limits that keep a module safe… - **Reference —** [User-defined types](https://openmarket.xyz/wrun/core-concepts/user-defined-types.md): Define your own typed classes with fields and methods, construct them, call methods, and mutate state through this. Model trading state in the shape of the… - **Reference —** [User-defined functions](https://openmarket.xyz/wrun/core-concepts/user-functions.md): Create custom, reusable functions with the function keyword: typed parameters, a typed return, default values, functions as values, and the rules that keep… - **Reference —** [Lambdas and reducers](https://openmarket.xyz/wrun/core-concepts/lambdas-and-reducers.md): Arrow functions, function values, and the loops that do the work of the reducer methods (map, filter, reduce, forEach, some, every). A wrun indicator has arrow… ## Settings dialog - **Reference —** [The settings dialog](https://openmarket.xyz/wrun/settings/overview.md): Declare a setting by its kind and the dialog draws the right control: one page per thing you can declare, in the order you meet them. - **Reference —** [Setting kinds](https://openmarket.xyz/wrun/settings/kinds.md): Fifteen kinds, one row each: the declaration, the control the dialog draws, the reader your code calls. - **Reference —** [Options on a setting](https://openmarket.xyz/wrun/settings/options.md): Every kind takes one options object, every key optional, and a key the kind cannot use is refused by name, on the declaration's line. - **Reference —** [Pages, sections, dividers, notes](https://openmarket.xyz/wrun/settings/layout.md): The layout words are top-level statements, and source order is the layout: each word applies to the settings declared after it. - **Reference —** [Presets](https://openmarket.xyz/wrun/settings/presets.md): presets({ Name: { setting: value, ... }, ... }) ships named sets of values with the indicator. - **Reference —** [The Style page](https://openmarket.xyz/wrun/settings/style-page.md): Every output you draw gets a row on the dialog's Style page without a declaration. - **Reference —** [Sessions and units](https://openmarket.xyz/wrun/settings/sessions-and-units.md): param.session declares a window on the 24-hour clock in its zone, and unit on a number puts a unit picker in the field. - **Reference —** [Picks, lanes, the cap](https://openmarket.xyz/wrun/settings/picks-and-lanes.md): Two kinds are picked on the chart, three are applied by the chart rather than read by the module, and a sheet holds at most 128 settings. - **Reference —** [What the build checks](https://openmarket.xyz/wrun/settings/checks.md): The declarations are read from the text without running it, and Run checks them before the compiler runs. ## Presentation - **Reference —** [Style anything](https://openmarket.xyz/wrun/presentation/style-anything.md): Every part a wrun indicator draws can be styled. A line, a column, a docked profile, a card in a corner, a label, a strike board and a pane each take their… - **Reference —** [What the chart shows](https://openmarket.xyz/wrun/presentation/overview.md): Three surfaces read the indicator's newest values and are drawn by the chart from declarations alone: the legend entry, a HUD card at one of the nine anchors… - **Reference —** [Plotting](https://openmarket.xyz/wrun/presentation/plotting.md): A wrun indicator draws by declaring, not by calling: it declares output(name, plot, panel, options) once at the top of the file and writes one number per bar… - **Reference —** [Styling](https://openmarket.xyz/wrun/presentation/styling.md): How outputs draw. The rule that keeps a wrun indicator honest: outputs are numbers, some numbers are decisions, and declarations map decisions to looks.… - **Reference —** [Drawing objects](https://openmarket.xyz/wrun/presentation/drawing-objects.md): A wrun indicator has three forms of drawing. A box or a segment is declared once over two outputs and evaluated on every bar; a run-level drawing declaration (… - **Reference —** [Cards, frames and panels](https://openmarket.xyz/wrun/presentation/cards-frames-panels.md): Tables, cards, panels and widgets show one snapshot of your indicator rather than one value per bar: a styled table in a corner, a status card, a small chart… - **Reference —** [Price canvases](https://openmarket.xyz/wrun/presentation/price-canvases.md): Five declarations draw a canvas on the price chart from cells the chart already serves or from a frame the module writes: plot.heatmap (a time by price heatmap… - **Reference —** [Legend](https://openmarket.xyz/wrun/presentation/legend.md): The legend names the indicator, then shows each drawn output's label and value; every word on it comes from a declaration. - **Reference —** [Labels, tooltips, badges](https://openmarket.xyz/wrun/presentation/labels-and-tooltips.md): The words a plot, a text mark or a label answers with: the label's style, the tooltip template, and the badge chips a ladder output turns into. - **Reference —** [HUD and hover cards](https://openmarket.xyz/wrun/presentation/hud-and-hover-cards.md): Two surfaces read the indicator's newest values and are drawn by the chart from declarations alone: a HUD card of typed tiles pinned at one of the nine chart… ## Functions - **Reference —** [TA library](https://openmarket.xyz/wrun/functions/ta-library.md): Every wrun indicator can use ./sdk/ta, which ships with the editor: 52 stateful classes covering averages, statistics, oscillators, ranges, trend systems, and… - **Reference —** [Moving averages](https://openmarket.xyz/wrun/functions/moving-averages.md): These classes smooth price into a trend line or wrap it in a band. Every one of them ships with the editor in the ./sdk/ta module (Sma, Ema, Wma, Hma, Alma… - **Reference —** [Oscillators](https://openmarket.xyz/wrun/functions/oscillators.md): Oscillators measure momentum and overbought or oversold pressure. Every oscillator ships with the editor as a stateful class in ./sdk/ta: Rsi, Wpr, Cmo, Tsi… - **Reference —** [Trend and volatility](https://openmarket.xyz/wrun/functions/trend-indicators.md): Trend tools read direction and strength, volatility tools read range: the directional movement system, the Ichimoku cloud, the parabolic stop-and-reverse, the… - **Reference —** [Volume and VWAP](https://openmarket.xyz/wrun/functions/volume-indicators.md): Volume tools fold volume into the calculation to read buying and selling pressure, participation, and the price volume actually paid. Three ship as classes in… - **Reference —** [Series functions](https://openmarket.xyz/wrun/functions/series-functions.md): Series functions answer the questions that come up constantly when writing an indicator: did two lines just cross, is a series rising, what is the highest high… - **Reference —** [Extra indicators](https://openmarket.xyz/wrun/functions/extra-indicators.md): The TA library is the core catalog of 52 classes. The ./sdk/ta-plus module adds 30 more with the same shape: construct the class in onStart(), call update()… - **Reference —** [Stats, history and lists](https://openmarket.xyz/wrun/functions/stats-history-lists.md): The ./sdk/stats module is the window arithmetic under the TA library and the extra indicators. It holds a stats namespace of allocation-free functions over a… - **Reference —** [Math functions](https://openmarket.xyz/wrun/functions/math-functions.md): Math in a wrun indicator is AssemblyScript's Math: absolute value, rounding, powers and roots, logarithms, and the full trig and hyperbolic families, on f64.… - **Reference —** [Control flow](https://openmarket.xyz/wrun/functions/control-flow.md): Control flow decides what runs on each bar. A wrun indicator is AssemblyScript, so the constructs are the typed C-style ones: if/else, the ? : ternary, switch… - **Reference —** [Strings and text](https://openmarket.xyz/wrun/functions/text-formatting.md): Strings in a wrun indicator live in string slots: byte-capped channels written once per bar from onBar() and read by a text mark, a label, a table cell or a… - **Reference —** [Colors](https://openmarket.xyz/wrun/functions/colors-kit.md): A color in a wrun indicator lives in one of three places: as a literal on a declaration, as a per-bar palette index on a color_by output, or as a packed number… - **Reference —** [Clock and sessions kit](https://openmarket.xyz/wrun/functions/time-and-sessions-kit.md): The ./sdk/clock module turns the one number bar.time() gives a wrun indicator, the bar's open time in UTC epoch seconds, into the questions a trader asks of a… - **Reference —** [Higher-timeframe kit](https://openmarket.xyz/wrun/functions/higher-timeframe-kit.md): Two modules build a higher timeframe without a second data feed. ./sdk/resample folds the chart's own bars: a Resampler for the eight timeframes the built-in… - **Reference —** [Order flow](https://openmarket.xyz/wrun/functions/order-flow-kit.md): The chart serves order flow a candle alone cannot show: the bar's aggressive buy and sell volume as two sided inputs, the bar's volume profile as… - **Reference —** [Levels kit](https://openmarket.xyz/wrun/functions/levels-kit.md): Levels are the prices a trader draws before the session starts: today's open, yesterday's high and low, last week's close, the session's range, the pivot point… - **Reference —** [Market structure kit](https://openmarket.xyz/wrun/functions/market-structure-kit.md): The ./sdk/structure module reads price as a sequence of swings and gives you, in every file, the bookkeeping every market-structure indicator rewrites by hand… - **Reference —** [Options kit](https://openmarket.xyz/wrun/functions/options-kit.md): The chart serves a coin's listed options as options_chain cells, one ten-value tuple per contract, on the live bar only (Data sources). The ./sdk/options… - **Reference —** [Alerts](https://openmarket.xyz/wrun/functions/alerts.md): An alert runs your published indicator in OpenMarket's cloud and tells you when a condition on one of its outputs, or a signal its file declares, comes true. - **Reference —** [Publishing](https://openmarket.xyz/wrun/functions/publishing.md): Publishing turns the wrun indicator in your editor into a versioned package on the OpenMarket registry, under your username, that you, the people you invite… ## Sharing - **Community —** [Who can use it](https://openmarket.xyz/wrun/sharing/overview.md): When you publish, you choose who can use your indicator and who can read its code. - **Community —** [Invite your community](https://openmarket.xyz/wrun/sharing/invite-your-community.md): Add people to an Invite only indicator by name, with one invite link, or from a list you already keep, all from its People panel. - **Community —** [Access keys and the API](https://openmarket.xyz/wrun/sharing/access-keys-and-api.md): Let your own site keep the people list: an access key lets your server add and remove people on one Invite only indicator as they pay and cancel. - **Community —** [Ready-made recipes](https://openmarket.xyz/wrun/sharing/recipes.md): Sell your Invite only indicator through Stripe, Patreon or a paid Telegram group, and one small file keeps its people list in step with who pays. - **Community —** [Connect Discord or Whop](https://openmarket.xyz/wrun/sharing/connect-discord-or-whop.md): Sell access through Whop or a paid Discord role, and a small script you run uses an access key to keep your indicator's people list in sync. - **Community —** [What members see](https://openmarket.xyz/wrun/sharing/what-members-see.md): Your members never type a name or a code: they open your link, sign in, and land on Add to chart, or on a request you approve. ## Cookbook - **Recipes —** [Cookbook](https://openmarket.xyz/wrun/cookbook/overview.md): Complete, working wrun indicators you can copy, run, and adapt, in six groups: what to draw on price, how to read order flow, prediction-market odds read… - **Recipes —** [Typed inputs tour](https://openmarket.xyz/wrun/cookbook/typed-inputs-tour.md): Every kind of setting the dialog can draw but text, on one small channel indicator: an average of a picked price field with percent bands, an offset in a… - **Recipes —** [Volume spike detector](https://openmarket.xyz/wrun/cookbook/volume-spike.md): Flag bars whose volume blows past its trailing average, scored as a z-score against a rolling mean and standard deviation. - **Recipes —** [Anchored VWAP](https://openmarket.xyz/wrun/cookbook/anchored-vwap.md): Weekly and daily VWAP that reset on real UTC session boundaries, with a shaded band and a stretch readout for mean-reversion context. - **Recipes —** [Regime filter (4h trend gate)](https://openmarket.xyz/wrun/cookbook/regime-filter.md): A no-repaint higher-timeframe trend gate that tints a line by regime and only marks entries when the confirmed 4h trend agrees with the signal. - **Recipes —** [Key levels](https://openmarket.xyz/wrun/cookbook/key-levels.md): Prior-day and prior-week highs and lows plus the running day open, drawn as horizontal levels that are calendar-correct on any chart interval. - **Recipes —** [Zone tracker](https://openmarket.xyz/wrun/cookbook/zone-tracker.md): Supply and demand zones drawn as boxes that switch themselves off when price mitigates them, with a live count of the zones still active. - **Recipes —** [Session map](https://openmarket.xyz/wrun/cookbook/session-map.md): Asia, London and New York each drawn as a box around the session's high and low, with a small tag inside the box's left edge (Asia violet, London sky, New York… - **Recipes —** [Volume heat hours](https://openmarket.xyz/wrun/cookbook/volume-heat-hours.md): Every clock hour boxed over its high and low, tinted by that hour's volume against the average of the last day's completed hours: quiet hours are nearly… - **Recipes —** [Supply and demand zones](https://openmarket.xyz/wrun/cookbook/supply-demand-zones.md): A zone at every confirmed swing high (supply, orange) and swing low (demand, sky), one zone height of ATR deep, anchored on the swing's own bar and extended… - **Recipes —** [Trend alignment](https://openmarket.xyz/wrun/cookbook/trend-alignment.md): Three averages on the price pane: the chart's own EMA (sky) beside the 1h EMA (violet) and the 4h EMA (teal), the higher-timeframe ones drawn as steps that… - **Recipes —** [Trend candles](https://openmarket.xyz/wrun/cookbook/trend-candles.md): The chart's own candles tinted by where the close sits against two moving averages. Above both averages the candle turns sky, below both it turns violet… - **Recipes —** [Strike Matrix](https://openmarket.xyz/wrun/cookbook/strike-matrix.md): The chart coin's live options chain as a board docked to the price axis: one row per strike inside a window around spot, one column per expiry (the nearest… - **Recipes —** [Session OI Levels](https://openmarket.xyz/wrun/cookbook/session-oi-levels.md): Where open interest was built and unwound in each day, as a profile anchored to the day's own time span. Each bar's change in open interest is spread over the… - **Recipes —** [Aggregated CVD](https://openmarket.xyz/wrun/cookbook/aggregated-cvd.md): One cumulative volume-delta line with volatility bands and sign coloring, on the chart's own market. - **Recipes —** [CVD divergence](https://openmarket.xyz/wrun/cookbook/cvd-divergence.md): Cumulative volume delta (aggressive buys minus aggressive sells, summed bar after bar) in coins, in its own pane under the chart, with its own axis. Every… - **Recipes —** [Positioning regimes](https://openmarket.xyz/wrun/cookbook/positioning-regimes.md): Each bar's open-interest change, counted in contracts and as a percent, in its own pane under the chart, colored by who moved: amber for price up with open… - **Recipes —** [Absorption](https://openmarket.xyz/wrun/cookbook/absorption.md): Bars where heavy one-sided volume failed to move price. The bar's delta (aggressive buy volume minus aggressive sell volume) sits in its own pane in muted… - **Recipes —** [Liquidation bursts](https://openmarket.xyz/wrun/cookbook/liquidation-bursts.md): Long and short liquidations in USD in their own pane under the chart, one column per bar: long liquidations in orange at its foot and short liquidations in… - **Recipes —** [Book Heat](https://openmarket.xyz/wrun/cookbook/book-heat.md): The chart market's resting order book painted behind the candles, bar by bar: every price level the book held when the bar closed is a cell, and the deeper its… - **Recipes —** [Liquidation Heat](https://openmarket.xyz/wrun/cookbook/liquidation-heat.md): Where the leverage opened on recent bars would be liquidated, painted behind the candles as a heatmap. Every bar seeds liquidation prices below its close for… - **Recipes —** [OI Liquidation Heat](https://openmarket.xyz/wrun/cookbook/liquidation-heat-oi.md): Where the positions opened over the lookback would be liquidated, estimated from the market's open interest and painted behind the candles as a heatmap. It is… - **Recipes —** [Volume Footprint](https://openmarket.xyz/wrun/cookbook/volume-footprint.md): Each bar's traded volume by price, split into its buy and sell halves and printed as footprint cells on the candle: the sells on the left, the buys on the… - **Recipes —** [TPO Letters](https://openmarket.xyz/wrun/cookbook/tpo-letters.md): The chart's own candles folded into a Market Profile: one letter per 30 minutes of the day, printed on every price the market traded during that half hour, the… - **Recipes —** [Session Volume Profile](https://openmarket.xyz/wrun/cookbook/session-volume-profile.md): Each day's volume by price, drawn inside the day's own time span: the profile grows from the day's first bar, buy volume green and sell volume red stacked on… - **Recipes —** [Market HUD](https://openmarket.xyz/wrun/cookbook/market-hud.md): One card at the bottom of the price pane that reads the market in one glance and follows every tick, in the glass look: a dark translucent card with round… - **Recipes —** [Decision board](https://openmarket.xyz/wrun/cookbook/decision-board.md): One card at the bottom of the price pane that grades the market factor by factor and says which side is ahead, so the chart keeps its full height. It is… - **Recipes —** [Order flow HUD](https://openmarket.xyz/wrun/cookbook/order-flow-hud.md): A card at the bottom centre of the price pane that says who is pushing price, read from the exchange's own taker side and kept current on the live bar. It is… - **Recipes —** [Order book HUD](https://openmarket.xyz/wrun/cookbook/order-book-hud.md): A card at the middle left of the price pane that shows what is resting near the price, read from the exchange's own order book and kept current on the live bar… - **Recipes —** [Session HUD](https://openmarket.xyz/wrun/cookbook/session-hud.md): Where the day stands, in one card at the bottom of the price pane, drawn in the stage look: a green gradient card with the chart's base asset (BTC on a BTC… - **Recipes —** [Gamma map](https://openmarket.xyz/wrun/cookbook/gamma-map.md): The chart coin's live options chain turned into gamma exposure by strike, docked on the price axis as a profile. Each row is one strike's net GEX, calls minus… - **Recipes —** [Volume profile and value area](https://openmarket.xyz/wrun/cookbook/volume-profile-value-area.md): The last 96 bars' volume profile docked on the price axis, the point of control row amber, the value area rows sky, the rest slate. The rows never go finer… - **Recipes —** [Volatility term structure](https://openmarket.xyz/wrun/cookbook/vol-term-structure.md): Implied volatility at one week (sky), one month (violet) and three months (teal) in their own pane. The gap between the one-week and three-month lines is… - **Recipes —** [Options Dashboard](https://openmarket.xyz/wrun/cookbook/options-dashboard.md): Eight tiles below the chart read the chart coin's live options chain at a glance: live net GEX at spot, the gamma flip and max pain with their distance from… - **Recipes —** [Odds vs price](https://openmarket.xyz/wrun/cookbook/odds-vs-price.md): On a Polymarket chart, the market's YES odds set against a pinned asset, Binance Futures BTCUSDT by default. A pane below price holds the rolling correlation… - **Recipes —** [ETF flows](https://openmarket.xyz/wrun/cookbook/etf-flows.md): The daily net flow of the chart coin's spot ETFs as one wide bar per day in a pane under the chart, amber for an inflow day and orange for an outflow day, in… - **Recipes —** [Liquidation map](https://openmarket.xyz/wrun/cookbook/liquidation-map.md): An estimate of where the market's open positions would be liquidated, drawn on the price axis as a two-sided profile. The profile docks on the right of the… - **Recipes —** [Options odds cloud](https://openmarket.xyz/wrun/cookbook/options-odds-cloud.md): Where the options market expects price to settle at the chosen expiry, drawn on the price axis as one smooth profile. A cloud docked on the right of the price… - **Recipes —** [Who is trading](https://openmarket.xyz/wrun/cookbook/whos-trading.md): Who did the volume over the last window bars, by the size of each trade. Under the chart, a donut shares the window's dollar volume out over seven trade-size… - **Recipes —** [Rotation map](https://openmarket.xyz/wrun/cookbook/rotation-map.md): Eight large coins on one map under the chart, placed by how they are doing against BTC. Left to right is strength: how far each coin's price in BTC sits above… - **Recipes —** [Volatility smile](https://openmarket.xyz/wrun/cookbook/vol-smile.md): Implied volatility by strike for three expiries of the chart coin's Deribit option chain, drawn under the chart as three smooth curves over a dollar strike… - **Recipes —** [Correlation matrix](https://openmarket.xyz/wrun/cookbook/correlation-matrix.md): How this chart's market moved with eight crypto perpetuals over the last window bars, as a market by market grid below the chart: the Binance Futures BTC, ETH… - **Recipes —** [Venue share](https://openmarket.xyz/wrun/cookbook/venue-share.md): Where BTC is trading right now. Below the candles, a donut gives each venue's share of the last 24 hours of dollar volume (this chart's venue in teal, Bybit… - **Recipes —** [Volatility surface](https://openmarket.xyz/wrun/cookbook/iv-surface.md): What the options market charges for the chart's coin, laid out as one picture under the candles. First a row of tiles, one per expiry, nearest first, each with… - **Recipes —** [Seasonality grid](https://openmarket.xyz/wrun/cookbook/seasonality-grid.md): A calendar of returns under the chart, shaped by the chart's interval and folded from a fixed span of the chart's own market, read as closed candles, however… - **Recipes —** [Depth curve](https://openmarket.xyz/wrun/cookbook/depth-curve.md): The market's resting order book as the classic depth curve under the chart: a pane with price across and dollars up, the bids in teal stepping up to the left… - **Recipes —** [Yield curve](https://openmarket.xyz/wrun/cookbook/yield-curve.md): The US Treasury par curve as it prints today, against a week ago and a month ago, in a pane below the chart: the nine tenors evenly spaced across, 1M to 30Y… - **Recipes —** [Moving-average cross](https://openmarket.xyz/wrun/cookbook/strategy-ma-cross.md): A strategy: long when the fast average crosses above the slow one, flat when it crosses back under. The fast average (sky) and the slow average (violet) on… - **Recipes —** [Risk-sized reversion](https://openmarket.xyz/wrun/cookbook/strategy-risk-reversion.md): A strategy: buy the dip as RSI climbs back out of oversold, protect it with a stop under the entry and a target above it (both sized in ATR), leave on recovery… ## FAQ - **Topics —** [General FAQ](https://openmarket.xyz/wrun/faq/general.md): Frequently asked questions about wrun: getting started, data sources and context, technical indicators, plotting, troubleshooting, language features… - **Topics —** [Best practices](https://openmarket.xyz/wrun/faq/best-practices.md): Guidelines for writing wrun indicators that are fast, honest about warm-up, and safe to replay: where state lives, what belongs in onStart() and what in onBar(… - **Topics —** [Common errors](https://openmarket.xyz/wrun/faq/common-errors.md): The messages a wrun indicator author meets in the chart, each with its cause and its fix, in the order they arrive: the checks the editor runs on your code… - **Topics —** [Debugging](https://openmarket.xyz/wrun/faq/debugging.md): A practical workflow for finding out why a wrun indicator is wrong: make visible what you cannot see, read the Console, isolate one output, read the numbers at… ## Strategies - **Backtesting —** [Strategies overview](https://openmarket.xyz/wrun/strategies/overview.md): A strategy is a wrun indicator that places orders. The file declares strategy({ ... }) beside its outputs and calls strategy.long, strategy.exit… - **Backtesting —** [Build your first strategy](https://openmarket.xyz/wrun/strategies/first-strategy.md): One idea taken from a sentence to a backtest you can evaluate honestly: write the strategy as one wrun indicator file in the chart's editor, backtest it, read… - **Backtesting —** [Writing strategies](https://openmarket.xyz/wrun/strategies/writing-strategies.md): The strategy({ ... }) declaration, the order API, the position model and sizing. The chart's Strategy Tester runs the engine's broker, so every rule below is… - **Backtesting —** [Fill simulation](https://openmarket.xyz/wrun/strategies/fill-simulation.md): How the broker decides when and at what price orders fill, how a bar that could have filled two levels is settled, and how the run reports its own precision.… - **Backtesting —** [Slippage and costs](https://openmarket.xyz/wrun/strategies/slippage-and-costs.md): Commission on spot, maker and taker fees on perps, and flat slippage, each declared in the file so a published strategy carries its own assumptions. The… - **Backtesting —** [Perps: margin, liquidation, funding](https://openmarket.xyz/wrun/strategies/perps.md): instrument: "perps" switches the broker from spot accounting to isolated-margin perpetual futures: leverage, maker and taker fees, funding settlement and… - **Backtesting —** [Reading the Strategy Tester](https://openmarket.xyz/wrun/strategies/reading-the-tester.md): The Strategy Tester is where a strategy's result lives on the chart: it docks under the chart whenever the chart holds a strategy, carries the trades, the… - **Backtesting —** [Stats reference](https://openmarket.xyz/wrun/strategies/stats-reference.md): Every performance stat a strategy run computes, its exact formula, its edge cases, and where the Strategy Tester shows it. The stats come from the engine's own… - **Backtesting —** [Examples](https://openmarket.xyz/wrun/strategies/examples.md): Complete strategy files to start from: the five perps scenarios behind the engine's acceptance battery and a Hyperliquid perp walkthrough, each with a line on… ## Reference - **Lookup —** [Quick reference](https://openmarket.xyz/wrun/reference/quick-reference.md): The wrun kit on one screen, then the parts of it that are easiest to forget: the two hooks, the generated accessors (the p_ / in_ / out_ families plus the cell… - **Lookup —** [Declarations and the sheet](https://openmarket.xyz/wrun/reference/declarations.md): A wrun indicator declares what it reads, writes and draws as top-level statements at the top of its file, and Run derives the sheet from them: the description… - **Lookup —** [Limits reference](https://openmarket.xyz/wrun/reference/limits.md): Every ceiling a wrun indicator runs under on the chart, in one place: the declaration caps Run checks when it derives the sheet, the runtime ceilings the… - **Lookup —** [Limitations](https://openmarket.xyz/wrun/reference/limitations.md): What a wrun indicator does not do in the chart, and where to find the numbers. An indicator is a sandboxed, declared computation over market data; a few things… - **Lookup —** [Exchange and symbol format](https://openmarket.xyz/wrun/reference/symbol-format.md): The exchange ids and the venue-native symbol spellings a wrun indicator uses where the file names a market: a pinned input's symbol and exchange. The… - **Lookup —** [Versions and contracts](https://openmarket.xyz/wrun/reference/versions.md): How a wrun indicator changes over time for someone who writes it in the chart: the contract a package runs under, the compiler the editor pins, and what a new…