Release notes
What is new for people who write wrun indicators. Newest first.
Each entry is one version of the indicator kit the editor builds with, written 0.<N> and dated by the day it was published. A later fix to that version shows as a dated line under its entry. The notes start at 0.124: what came before is told on the pages it changed. Versions and contracts explains what a new version can and cannot change.
0.127
An indicator holds up to 1,024 settings.
Nothing to change. A script that built before builds exactly as before.
1,024 settings
An indicator can declare up to 1,024 settings after expansion (128 before), so a script ported from Pine keeps all its inputs. The build still refuses the declaration that crosses the cap. See Picks, lanes, the cap.
0.126
Panels that sit in a grid, and tables and tiles that hold more.
Nothing to change. A script that uses none of the new words builds exactly as before.
Panels in a grid
Panels below the chart can sit in a grid. Call panel.layout({ columns, areas }) to name each panel's cells: up to 8 weighted columns and 8 rows, "." for an empty cell. See Panel layout.
Tables and tiles take more words
Tables and tiles hold more text and take more options. A table cell holds 256 characters (64 before).
| What you can do | Write |
|---|---|
| Hide a table's header. | header: false |
| Wrap a series' column in a table. | wrap: true |
| Draw a table on the chart. | place: "chart" |
| Give tiles the filled accent. | accent: "fill" |
| Lay tiles out in up to 12 columns. | columns |
| Put captions over runs of tile columns. | groups |
What changes for a script that uses the new words
The new words ride one new sheet table, panel_layout, that an older chart skips. Each panel keeps a value an older chart draws.
0.125
Safer builds, stronger backtests and more ways to draw.
Nothing to change. Every script you already have builds exactly as before.
Seven new build warnings
The build names seven mistakes that run fine but compute wrong numbers. A warning never blocks a build: a script that built before still builds and runs, and may now show a warning.
| Mistake | Warning |
|---|---|
| A series class is updated only inside a branch, so it skips the other bars. | WRUN_ |
| A setting is read at the top of the file, where it reads NaN. | WRUN_ |
| One series instance is updated twice a bar, so it moves twice. | WRUN_ |
A time pattern uses a letter the formatter does not replace, such as hh or a. It prints as typed. | WRUN_ |
| A choice setting is compared with a bare index. | WRUN_ |
new Clock() names no zone, so it reads hours in UTC. Name the zone, or write new Clock("UTC"). | WRUN_ |
ago(n) reaches past the size of a History, which is always NaN. | WRUN_ |
The one you will meet first
Compare a choice setting with the generated name of the option, pc_<setting>_<label>, as the built-in templates now do.
if (p_mode() == 1) // warns
if (p_mode() == pc_mode_exponential) // no warningTo keep a line on purpose, say why in a comment: // om-allow update-in-branch: <reason> or // om-allow update-shared: <reason>.
Stronger backtests
A strategy can read its own trades, place more kinds of orders and switch on six backtest settings. Each setting is off until you set it, so the numbers of a strategy you already published do not move.
Six settings on the strategy declaration
| Setting | What it does |
|---|---|
process | A market order placed on a confirmed bar fills at that bar's close, not at the next open. |
brackets | An exit's stop and target work from the entry fill, on the entry's own bar. |
commission | A fee for each unit of every fill. |
commission | A fee once for each order fill. |
allowEntryIn | Only long entries, or only short entries, open a position. |
max | At this fall from peak equity the strategy cancels its orders, closes the position and rejects new entries. |
New orders and trade reads
| What you can do | Call |
|---|---|
| Place a stop-limit entry. | sendStopLimit() |
| Close part of a position. | strategy. strategy. |
| Set exits in ticks of the market. | profitTicks lossTicks trailTicks strategy. |
| Read the prices, times, bars, size, profit, fees, run-up and drawdown of each trade. | strategy. strategy. |
| Label the next order in the Strategy Tester. | comment() |
A long backtest no longer stops at 10000 closed trades. The trade list keeps the newest 10000, an older trade is trimmed, and every total still counts it. See Limits.
More ways to draw
Four new drawing options and one label style. Every picture is a real chart.

behind_candles: true
Under the candles. behind_candles puts a range, a box, the box handles or a declared box under the candles.

join_gaps: true
Across empty bars. join_gaps joins a line across bars with no value.
show_last: 20
show_last draws an output (not an inset) on its last bars only.
displacement_bars shifts a background or bar tint.
New building blocks
Nine kit classes for patterns that used to need hand-written code, and a bar that knows more about itself.
| Class | What it is for |
|---|---|
Sessions | Several time windows in one object. |
Pool | Objects that come and go. |
HandlePool | Keep the newest N drawings. |
HistoryOf | The past values of an object. |
FixedMap | Values keyed by a number. |
Matrix | Rows and columns of numbers. |
Htf HtfHlc | Any ta class on a higher timeframe. |
Stepped | The stepping alone, for values you commit yourself. |
Also new: the approximate comparisons (approxEq and its siblings, for two computed prices that == would call different), format on the text kit, and copyFrom on the stateful TA classes.
A bar knows more about itself
| Question | Call |
|---|---|
| Its number. | bar.index() |
| Whether it has closed. | bar.isClosed() |
| When it closes. | bar.closeTime() |
| Whether it is the last bar of the regular session, or of the day. | bar. bar. |
The close time and the two last-bar flags read the new time fields bar_close_sec and session_last.
Log lines and dividends
Write lines to the editor's Console, and read the cash dividends of a US company.
| What is new | Word |
|---|---|
| Log lines. Write a line with up to four numbers to the editor's Console. Only in the editor: a published indicator never logs. | log.info log.warning log.error |
Company data. A dividends input reads a US company's cash dividends. ticker names the company, so it works beside any chart. The next dividend's date and amount are two market facts. Both are filled when the indicator runs in your browser on the chart. | dividends |
What changes for a script that uses the new things
| Your script | What changes |
|---|---|
Calls bar.index(), bar.isClosed(), a log line or a new strategy call. | It builds on the new runtime version, wrun-7. |
Reads bar.closeTime() or a last-bar flag. | It adds the time input to its sheet. |
| Every other script. | It builds exactly as before. |
Try it
strategy({ processOrdersOnClose: true, maxDrawdownPercent: 20 });
log.info("closed trades {0}", f64(strategy.closedTrades.count()));0.124
Option flow filters you can change from the settings dialog.
Nothing to change. A literal word such as dte: "0dte" reads as before, and nothing you already published changes.
Filters from a setting
An options_flow input can take its expiry and moneyness filters from a setting. Write dte: "@<setting>" or moneyness: "@<setting>" over a param.choice whose picks are the filter's own words (its style_values, else its labels). The chart reads the picked word on every run, so a change in the settings dialog fetches again with no rebuild, the same way expiries already works on option_strike_flow. Scope "venue" still takes "all" alone. See Knobs from a setting.
Two mistakes caught earlier
Two mistakes now stop before the first run.
| Mistake | Where it stops |
|---|---|
A setting is named like one of the filter's own words. dte: "@week" over a setting named week would read as the word and never as the setting, so the build asks you to rename the setting. This holds for every filter that takes a word from a setting. | At build |
| The default of a bound choice is none of its options. Before, the first run failed instead. | At the sheet check |
Try it
param.choice("dte", ["Every expiry", "0DTE only", "This week"], "Every expiry", { label: "Expiries", style_values: ["all", "0dte", "week"] });
input("calls", options_flow.call_prem_total, { dte: "@dte", missing: "nan" });