Skip to content

Releases

PowerBridge 0.13.1

Choose a tag to compare

@hudsonwa hudsonwa released this 31 Oct 00:20
ef590a0

A documentation release: no code or behaviour changes, same digests as 0.13.0.

Changed

  • The powerbridge-accel package description (its PyPI page) is rewritten for users: what the kernel is, how to install and check it, and how to build it (#286).
  • The README and docs/ACCEL.md say powerbridge-accel is on PyPI (from 0.13.0) (#286).

PowerBridge 0.13.0

Choose a tag to compare

@hudsonwa hudsonwa released this 30 Oct 23:36
94d11f3

Highlights:

  • A negative array index now stops the run with a clear error on both engines, instead of silently reading or writing an element counted from the end. Strategies that relied on the wrap give a different result: they now stop.
  • The release workflow runs the full native-vs-Python test suite against the kernel in every platform's wheel before attaching it.

Changed

  • A negative array index (A[-1], read or written, literal or computed) now
    stops the run with array index -1 out of range ..., like an index past the
    end, on both the Python path and the native kernel. It used to wrap round
    silently and read or write an element counted from the end (#282).
  • pl_oracle --help hides maintainer-only flags (they still work; see docs/dev/agent-guide-details.md) (#260).
  • mc_ground_check reads the optional MultiCharts reference files (reserved_words.txt, keyword_index.txt) from --reference-dir DIR or PB_MC_REFERENCE_DIR, instead of a fixed folder inside the source tree; without them it skips those cross-checks as before (#280).

PowerBridge 0.12.0

Choose a tag to compare

@hudsonwa hudsonwa released this 30 Oct 14:39
7ef76a7

Highlights:

  • Strategy Print output is shown: on stderr, in a file with --print FILE, or as prints from run_el / run_oracle, the same on both engines.
  • Each GitHub Release carries a SHA256SUMS file and a build provenance attestation per file, and the release workflow tests the built wheels before attaching them.
  • pl_examples also writes the example configs and hand_written.py, so the documented commands work after a wheel install.
  • When the native kernel cannot run a program, the fallback note is one line saying the Python engine ran and why.

Added

  • Each GitHub Release now carries a SHA256SUMS file over every sdist and wheel and a build provenance attestation for each file, so a download can be checked with sha256sum -c and gh attestation verify; see SECURITY.md (#251).
  • Print output is shown: pl_run and pl_oracle write a strategy's Print lines to stderr, or to a file with the new --print FILE, and run_el / run_oracle return them as prints. The native kernel prints the same lines as the Python engine. Fills, digests and stdout are unchanged. Generated Python calls pl_print(...) instead of print(...) (#254).
  • pl_examples also writes examples/configs/ES.json, examples/configs/NQ.json and examples/hand_written.py, so the USAGE.md and PYTHON_STRATEGIES.md commands work after a wheel install; CI now runs the documented commands from an empty directory against the built wheel, and the docs mark unreleased features new in the next release (#N), checked against this section (#258).

Changed

  • When the native kernel is installed but cannot run a program, the note on stderr is now one line saying the Python engine ran and why ([pl_oracle] note: ran on the Python engine because the native kernel does not support bar_ref series yet; ...); -v adds the kernel's own refusal text (#254).
  • The release workflow now tests the built wheels before anything is attached or published: the powerbridge wheel runs the public tier from a clean venv, and each powerbridge-accel wheel runs a native-vs-Python digest check on the examples on its own platform runner (#246).
  • run_el no longer takes the private _python_path_notify keyword; pl_run uses an internal helper instead (#242).
  • The maintainer-only capture reader analyze_capture.py moved from pl_transpiler/tools/ to the repository's tools/, so the wheel no longer ships it; the unused tools/measure_audit_packet.py is gone, and ground_truth/captures/MANIFEST.md is now a short data card (#248).
  • Internal: strict mode and the unimplemented-call counts are kept per run, and the EL emitter's comment maps per call, so two run_el / run_oracle runs with different strictness no longer interfere. (Emits in threads could still mix up comments until #256.) The engine's trade-stat trace hook is FillEngine(capture_stats=...) / set_capture_stats() instead of a fixture-named private flag. Output and digests are unchanged (#244).

Fixed

  • Mirror-dialect output (pl_transpile --dialect mirror) no longer reads _state when a Variable is passed to CrossesAbove / CrossesBelow or another series function; it passes the bare variable, as the docs say. el_emit gives the same EasyLanguage as before, and runnable output is unchanged (#242).
  • pl_run / pl_oracle --help no longer point at examples/configs/ES.json or csv_to_pbar, which a wheel install does not have (#242).
  • docs/API.md shows the full run_el / run_oracle signatures (drawings, drawing_case_id, drawing_tape, use_native), says why seed_warmup defaults to True in run_el and False in run_oracle, and a test now fails when a documented signature drifts from the code. USAGE.md and PYTHON_STRATEGIES.md use --dialect mirror and drop the redundant --max-bars-back auto (#242).
  • LIMITATIONS.md and USAGE.md no longer call MaxBarsBack opt-in or say the default stays 0: they describe auto as the default and 0 as the opt-out, and the USAGE.md section is shorter. ACCEL.md no longer lists Print as refused by the native kernel. A test now fails if those stale phrases return (#250).
  • emit_el, parse and transpile called from several threads at once no longer mix up comments between sources: the lexer returns comments with its tokens (tokenise_with_comments) instead of through the module-level lexer.last_comments list, which is gone, and the parser's shared lex/parse cache is locked. Output is unchanged (#256).

PowerBridge 0.11.0

Choose a tag to compare

@hudsonwa hudsonwa released this 24 Oct 07:38
4235d5f

Highlights:

  • --max-bars-back defaults to auto, so a strategy's warm-up bars no longer trade where MultiCharts' would not, and the quickstart needs no flag (#237).
  • Bars CSVs are checked: the slash-date order is inferred (or the run asks for --date-format), and bars that go back in time stop the run (#229, #237).
  • EL run-time errors and a missing ; stop with one line naming the EL line, instead of a traceback or a silent run (#223, #235).
  • The run_el / run_oracle library lives in pl_transpiler.run and pl_transpiler.oracle, and pl_transpile --dialect names the output dialect (#217, #227).
  • Some runs give different results or now stop; see the behaviour changes under Changed.

Added

  • pl_transpile --dialect {runnable,mirror} selects the output dialect with the same names as transpile(src, dialect=...); --no-persist stays as an alias for --dialect mirror (#217).
  • InstrumentConfig.round_turn_cost ($ per contract, default 25.0) sets the cost the native audit packet subtracts from each closed trade, instead of a fixed $25. The built-in NQ and ES configs keep 25.0, so their packets are byte-identical; fills and digests do not depend on it (#233).

Changed

  • Behaviour change: --max-bars-back on pl_run and pl_oracle defaults to auto, and max_bars_back in run_el / run_oracle to None (auto), as MultiCharts auto-detects MaxBarsBack. When the lookback cannot be inferred, the default falls back to 0 with a stderr note (an explicit auto still stops with an error). The status line shows the number used (max-bars-back 21 (auto)). Pass --max-bars-back 0 (max_bars_back=0) for the old results; digests with an explicit value are unchanged on both engines (#237).
  • Behaviour change: without --date-format (date_format=None in load_bars_csv / load_bars), the slash-date order of a bars CSV is inferred from the whole file. When it cannot tell, or both orders occur, the run stops with one line asking for --date-format mdy or dmy (exit 2). Before, slash dates were read day-first, so a month-first file holding only days 1-12 was silently misread. EL integer dates load as before (#237).
  • Behaviour change: pl_run, pl_oracle, load_bars_csv and load_bars stop on bars that go back in time, naming the CSV line (bars out of order at line 4: 2024-01-02 09:29 comes after 2024-01-02 09:31), with exit 2 (ValueError in the library). Bars with the same date and time are still accepted (#229).
  • Behaviour change: a statement or declaration without its closing ; is a syntax error (missing ';' at the end of the statement, line, caret, exit 2). The documented omission before Else and attributes like [IntrabarOrderGeneration = False] still parse, and Close Data2-style forms once reported as unimplemented keywords now stop at the missing ;. Generated code is unchanged for every file that still parses (#235).
  • A run-time error in the EL program (array index out of range, division or Mod by zero, any other exception from the generated code) stops pl_run and pl_oracle with one line naming the EL line and exit 2, instead of a traceback and exit 1. The library raises the new ELRuntimeError (with .line), which is also an instance of the original exception type; PB_DEBUG=1 shows the traceback (#223).
  • The library code behind pl_run and pl_oracle moved to pl_transpiler.run and pl_transpiler.oracle; the CLI modules are thin argument parsers and the old import paths still work (#227).
  • The --help text of every command is in plain language, with maintainer options listed last under "advanced options"; option names and behaviour are unchanged (#225, #229).
  • pl_transpiler.engine no longer re-exports private helpers (_parse_el_date, NQ, ...); import them from engine_dates and runtime.instrument_config (#217).
  • The AUDIT_REF_3_* pinned-digest constants moved to tests/reference_pins.py, since only the tests use them (#233).
  • Internal: the native kernel has one Rust fill engine; the unused copy in accel/src/engine/ is gone. Fills and digests are identical (#231).
  • The dev tools are pinned in the dev extra and CI installs it, so pip install -e '.[dev]' gives the same lint, type-check and test results as CI (#221). The core modules are fully type-annotated and mypy runs with check_untyped_defs (#215).

PowerBridge 0.10.0

Choose a tag to compare

@hudsonwa hudsonwa released this 24 Oct 03:10
ef3f4f7

Highlights:

  • pl_oracle --summary prints a performance summary of the closed trades.
  • --version says whether the native kernel is available, and why not.
  • A plain pytest run without the native kernel is short and quiet, and tools/dev_setup.sh sets up a full development environment (#186, #188).
  • The lexer runs in linear time and pl_run / pl_oracle parse a program once per run (#180, #182).

Added

  • pl_oracle --summary prints a performance summary of the closed trades to stderr: net, gross profit and loss, trades, winners, losers, win rate, closed-trade max drawdown and open contracts. P&L uses the big point value, before commission and slippage. The text is the same on both paths and the digest is unchanged.
  • --version on the command-line tools says whether the native kernel is available and, if not, why; native_status() gives the same check from Python (#173).
  • tools/dev_setup.sh sets up a development environment in the active venv: upgrades pip, installs .[dev] editable, builds the native kernel when cargo is available and prints the kernel status. CONTRIBUTING leads with it and CI runs it in a fresh venv (#188).

Changed

  • Sell / BuyToCover ... from entry("X") stops (exit 2) only when an entry with a different name is open on its side; with entry X alone open, even pyramided, it closes the position as before 0.9.0 (#24).
  • Without the native kernel, a plain pytest run leaves the kernel-only tests out and prints one line with their count and how to build the kernel, instead of about 600 skips; -m needs_native still collects them (#207). The remaining skips are grouped by category with a pointer to the setup docs (#186).
  • The lexer runs in linear time (a 3,200-line program lexes in about 0.04 s instead of 2 s), and pl_run / pl_oracle lex and parse a program once per run instead of up to ten times; output is identical (#180, #182).
  • Packaging is declared in pyproject.toml only; setup.py is gone and the pl_examples files live in pl_transpiler/_examples/. The wheel contents are unchanged (#192).
  • pl_transpiler/builtins.py imports its runtime functions by name, so mypy and ruff check the builtin table, and mypy runs with stricter flags (#198, #200).

Fixed

  • Contributor setup works on Python 3.9's bundled pip: CONTRIBUTING upgrades pip before the editable install, and CI runs that setup on 3.9 (#175).
  • A strict-mode stop (from entry ("X") with another named entry open, a missing bar column such as OpenInt, an unimplemented builtin) names the line of the statement that raised it, not the first line mentioning the word (#178).
  • With several front-end errors, each unknown keyword is labelled unimplemented EL keyword 'foo' at line N, as for a single error (#196).

PowerBridge 0.9.0

Choose a tag to compare

@hudsonwa hudsonwa released this 23 Oct 15:21
80b6064

About the version history. 0.1 to 0.9 were the first public releases of a tool developed privately, cut over a few days as each batch of verified features landed. From here, releases are spaced out and made when there is enough new content. See the CHANGELOG.

Highlights:

  • --max-bars-back auto works out the strategy's lookback for you (#163).
  • Series functions such as Average take arithmetic, offset and nested-call price arguments and give the correct result (#165, #167).
  • crosses above / crosses below compare the right bars when MaxBarsBack skips bars (#161).
  • Several programs that the native kernel ran differently from Python now fall back to Python (#153, #155).
  • Some programs give different, correct results; see the behaviour changes under Fixed (#159, #161, #167).

Fixed

  • Behaviour change. A series function whose price argument is arithmetic or a nested call now uses that argument's own per-bar history; before, Average(Value1 * 2, 5) and Average(Value1 + Value1, 5) silently gave wrong values and Average(Average(Close - 1, 3), 5) raised TypeError. Results change for price arguments that add two series or variables (High + Low, Close + Value1) or multiply one by a whole number (Close * 2, 2 * MyVar); plain arguments are unchanged, and an argument that reads a variable inside an If, loop, Once, Switch, IFF or and / or stops with an error (exit 2) (#167).
  • Indicator calls that crashed at run time now run or stop with a one-line error (exit 2): Average((High + Low) / 2, 10), Highest(Close[5], 10), Average(Range, 5), Range[2], TrueRange[2] and Variance(Price, Length, DataType) run on the Python path. A negative TgtBar in LinearRegValue stops with an error; programs that ran before are unchanged (#165).
  • Behaviour change. crosses above / crosses below between a variable and a price series or function result (AvgC crosses Close) compared the wrong bars under MaxBarsBack above 0 on both paths and now gives a different, correct result. It no longer raises IndexError on the Python path; crosses between two series, two variables or two functions, and all runs with MaxBarsBack 0, are unchanged (#161).
  • Behaviour change (Python path). A variable declared with a negative initial value (Vars: TLID(-1);) is now numeric, so drawing ids compared or passed to getters no longer raise TypeError. Programs that compared such a variable to its initial value or relied on its full double precision now give a different result, matching the native kernel; Date[n] / Time[n] before the start of the tape read 0 instead of raising (#159).
  • A drawing anchor that is not a bar on the tape (e.g. TL_New(Date[1], Time[1], ...) on bar 1) no longer fails; both paths record it with a null bn and the drawing dumps match. --explain-native now says it is a compile-time check (#157).
  • The native kernel runs EntryName(n) / ExitName(n) and the bracket form of an input (Len[1]), so inputs such as ExitTime(1555) no longer refuse with "bar_ref series" (#153).
  • The native kernel refuses a program that reads an input named like a per-bar runtime key (Inputs: MaxShares(2)) and falls back to Python, which gave different trades before; --explain-native names the collision (#153).
  • The native kernel refuses a program that reads an OutPath input outside a file path and falls back to Python, which gave different results before; Print(File(OutPath), ...) still runs natively (#155).

Added

  • --max-bars-back auto on pl_oracle and pl_run (and max_bars_back="auto" in run_oracle / run_el) uses the lookback inferred from the source, shows it on the status line (max-bars-back 11 (auto)) and stops with an error naming the construct when it cannot be inferred. Without the flag results are unchanged; only the stderr warm-up note's wording changes (#163).

PowerBridge 0.8.1

Choose a tag to compare

@hudsonwa hudsonwa released this 23 Oct 09:47
0a8c0e9

Added

  • pl_examples writes the quickstart's example strategy and synthetic bars into ./examples/ (never overwriting), so the README quickstart works straight after a wheel install (#147).
  • The native kernel runs the positions-ago trade history EntryDate(n), EntryTime(n), EntryPrice(n), ExitDate(n), ExitTime(n), ExitPrice(n) and MaxShares(n), in call and bracket form, plus their bare forms (#149).
  • The native kernel runs Floor, ELDateToDateTime and the computer-clock words CurrentTime_s, CurrentDate_s and ComputerDateTime (#145).
  • The native kernel runs StrLen, FormatDate, NewLine, Text_SetColor and the FileAppend / FileDelete no-op stubs (#138).
  • A [dev] extra (pip install -e '.[dev]') installs the test, lint and wheel-build tools (#140).

Changed

  • pl_run writes its per-bar rows with the Rust kernel when it is installed and the run is full-tape (byte-identical CSV; --native / --python as in pl_oracle, and [native] / [python] on the status line) (#3).
  • The native kernel refuses a string mixed with a number instead of converting it (#138).
  • The README quickstart starts from the wheel install, explains the stderr status line and adds a tested "Your own strategy" section (#136, #140, #151).
  • LIMITATIONS notes that el_emit does not check the argument types of multi-argument functions (#7).
  • CONTRIBUTING has a generated table of default test skips (tools/skip_report.py) and says what public CI covers (#136).

Fixed

  • --explain-native names a refused keyword by its EasyLanguage spelling (MaxPositionProfit) instead of the internal name (#149).
  • pl_run, tools/gt_sweep.py and tools/accel_gate.py count round turns from exit records, like pl_oracle, instead of fills // 2 (#140).

PowerBridge 0.8.0

Choose a tag to compare

@hudsonwa hudsonwa released this 23 Oct 05:00
3c5ac21

Added

  • The native kernel runs variables declared inside a block (Vars: inside begin ... end), so these programs no longer fall back to Python (#128).
  • --explain-native lists the Python 3.12+ refusal of an Average over a series of unknown int/float type (#128).
  • The native kernel runs the total order modifier and from entry ("X") named exits with a literal label (#125).
  • The native kernel runs Round(value, precision), MinMove, PriceScale and LastBarOnChart_s (#122).
  • The native kernel runs CurrentSession, SessionCount, SessionCountMS, SessionEndDay and SessionEndDayMS (#113).
  • The native kernel runs SessionEndTime, SessionStartTime and the sibling session-time words (#109).
  • pl_oracle --explain-native FILE (and explain_native()) lists every construct the native kernel would refuse (#111).
  • A pytest run that skips tests ends with a summary of skips grouped by reason (#106).
  • docs/USAGE.md has a "Warm-up and MaxBarsBack" section (#106).
  • docs/PYTHON_STRATEGIES.md teaches the mirror dialect from scratch, with a tested example in examples/hand_written.py (#102).
  • pl_run and pl_oracle print a warm-up note: when a strategy reads past bars without --max-bars-back; -q hides it (#102).
  • el_emit reports string or true/false arguments passed to verified numeric parameters as ARG-TYPE-BAD (#87).
  • The native kernel runs numeric and true/false arrays, the common Array_* functions and for loops with break / continue (#100).
  • The native kernel runs the predeclared Value0..Value99 and Condition0..Condition99 variables (#104).

Changed

  • CI builds the native kernel for Python 3.9, 3.12 and 3.14 and runs the native-vs-Python parity tests on each (#124).
  • The frozen el_emit parser corpus moved from emitted/ to tests/fixtures/emitted/ (#115).
  • The README quickstart passes --max-bars-back 21, so the demo prints no warm-up note (#115).
  • Tests carry needs_native, needs_captures and perf markers; a plain pytest run deselects captures and perf tests (#115).
  • The README says the Python to EasyLanguage direction accepts only the mirror dialect and explains the warm-up difference (#102).
  • The README quickstart shows the Python to EasyLanguage direction (el_emit) (#89).
  • The repository was recreated on 2026-10-22; pull-request pages from before then are not available (#89).
  • pl_oracle -v stays user-facing; the kernel's [accel] internals now need -vv or PB_DEBUG=1 (#99).
  • The installed package no longer adds the checkout root to sys.path on import (#99).
  • CONTRIBUTING, LIMITATIONS and ACCEL docs describe default test skips, the prebuilt accel wheels and how to tell which path ran (#99).
  • parser.py and py_front.py are split into smaller modules, with byte-identical output (#108).
  • engine.py, codegen_el.py and runtime/_rt_indicators.py are split into smaller modules, with byte-identical output (#112).
  • ruff also checks import sorting, pyupgrade and bugbear rules; re-raised errors now chain their cause (#117).
  • CI's mypy job type-checks the whole pl_transpiler package (#119).

Fixed

  • EL names that clash with Python names (such as max or str) and blocks holding only a redeclaration now transpile to valid Python (#130).
  • Native Array_Sum and Average now add exactly like the running Python's sum(), including the 3.14 rule (#124).
  • --explain-native no longer crashes the native kernel on a Vars: declared inside a block (#111).
  • An undeclared ValueN / ConditionN read before it is written no longer raises UnboundLocalError in the Python engine, and keeps its value across bars (#103).
  • Without -o, el_emit's check report names the input file instead of a temporary file (#102).
  • The native typed trace prints exactly what the Python trace prints (#93).
  • The native kernel's Mod, division by zero and other numeric edge cases now match the Python path instead of trading on inf/NaN (#95).
  • The native kernel reads bar lookbacks (Close[n] and so on) unrounded, as the Python runtime does (#97).

PowerBridge 0.7.0

Choose a tag to compare

@hudsonwa hudsonwa released this 22 Oct 11:15
abec5e7

Added

  • Drawing dump: run_oracle(..., drawings=True) and pl_run / pl_oracle --drawings record trend lines, arrows and text objects as a versioned JSON
    dump (docs/DRAWING_DUMP.md, schema in ground_truth/drawing/schema/).
    It is off by default, and with it off the trade digest is unchanged.
    ground_truth/drawing/ holds seven drawing cases; the tests run each one on
    synthetic bars, and compare against MultiCharts readbacks only when you
    supply your own copy (it is licensed and not in the repository).
  • The native kernel records drawing objects too, so --drawings no longer
    forces the Python path. Its dump matches the Python one except for
    producer.kind. Drawing calls the kernel does not implement fall back to
    Python. Anchor prices in the dump are stored as float32 on both paths.
  • TL_Get*, Arw_Get* and Text_Get* read the recorded object. They stop the
    run with an error when drawings are not being recorded, and TL_GetValue
    always stops, since its interpolation is not measured.
  • #BeginCmtry … #End blocks parse. PowerBridge has no commentary-on mode, so
    the block is kept in the AST (and written back by the EL emitter) but not run,
    on both the Python and native paths. Commentary and CommentaryCL accept
    several arguments, joined into one message.
  • A crosses over B and A crosses under B are accepted as synonyms for
    crosses above and crosses below, and produce the same code. They used to
    fail with a misleading "expected 'then'" error.
  • N Point / N Points in an expression means N minimum price moves
    (N * MinMove / PriceScale from the instrument config; NQ: 0.25), so
    Buy next bar at Highest(High, 5) + 1 Point Stop; now runs on the Python
    path. The native kernel has no MinMove/PriceScale value and refuses such
    programs loudly.
  • Tests for indexed Data2 spellings (Close[N] of Data2, Close of Data2[N],
    Close Data2) check that they fail loudly rather than read Data1.
  • The EL keyword catalog records how much evidence backs each keyword. Each line
    of pl_signatures.jsonl gains kind (syntax for language and filler words
    such as If or Shares, builtin otherwise), arg_types, max_arity,
    verification and verified_by, all generated from PowerBridge's own code and
    tests by tools/gen_catalog_fields.py (a test fails if the shipped file is
    stale and prints the regenerate command). verification is n/a for syntax
    words; for builtins it is verified:capture-strategy (used by a strategy whose
    per-bar outputs (required columns) match a MultiCharts capture in
    tests/verify_all.py; the captures are not public, so that check skips in a
    clone), verified:test or documented-unverified. max_arity and
    arg_types are filled only where PowerBridge itself defines an arity and are
    null otherwise. catalog.kind(), catalog.arg_types(),
    catalog.max_arity() and catalog.verification() read them,
    catalog.coverage() counts keywords per kind and level, and
    pl_signatures.schema.json describes a record. Existing fields are unchanged.
  • The keyword catalog fills more gaps, each checked by running PowerBridge
    (tests/test_catalog_returns.py runs every keyword it fixes and compares the
    value type with catalog.returns()). The 16 color constants and
    OpenEntriesCount now return numeric instead of unknown, and 84 builtins
    that were on mc_verified_builtins.txt without a signature record (such as
    CurrentBar, Symbol, the Array_* helpers and the session-time words) gain
    one. Unknown returns drop from 184 to 171; the rest are declaration and type
    words, order statements, runtime stubs and the Array_Set*Value setters, whose
    return value PowerBridge's own code marks as unsettled, so they stay
    unknown. Three verified tokens still have no record, by design: Abort (a
    statement), and CommandLine and EntryName (not implemented). A test pins
    these counts.
  • docs/reference/: a keyword reference for the 257 EasyLanguage builtins
    PowerBridge supports or has evidence for, grouped by topic. Each entry shows
    the catalog's kind, return type, arity and verification level, the run status
    observed when PowerBridge runs it, a short description and, for many, an
    example. tools/gen_reference.py builds the pages from the catalog and
    docs/reference/_notes.json; a test runs every example and fails when the
    pages are stale.
  • docs/API.md: a reference for the public library functions and the CLIs,
    with runnable examples. pl_transpiler.__all__ lists the public names, and
    run_oracle, load_bars, load_config_file, catalog and
    UnimplementedKeywordError now import from pl_transpiler directly.
  • docs/DESIGN.md: design notes on the architecture, the main decisions and
    their trade-offs, how verification works (public and private), and known
    limitations.
  • CONTRIBUTING: where reference and catalog facts must come from (PowerBridge's
    code, tests and observed behaviour, never vendor documentation).

Changed

  • Colour words, RGB, LegacyColorToRGB, GradientColor and the Tool_*
    line styles now use the values measured in MultiCharts (for example Blue is
    16711680 and Tool_Solid is 1). Colours and calls without a measurement stop
    with an error instead of returning a guess.
  • pl_run and pl_oracle print the "powerbridge-accel not installed" note
    only with -v / --verbose (new on pl_run). Notes about an installed
    kernel that refuses a program or has the wrong version still always print.
    The note now names the full docs/ACCEL.md#install URL instead of
    "README#acceleration", which a terminal cannot open.
  • The README is cut to a pitch, install, a short quickstart and links; the
    walkthrough, CSV format and engine assumptions moved to docs/USAGE.md, the
    limitations to docs/LIMITATIONS.md, and the accel install and benchmarks to
    docs/ACCEL.md.
  • Sell / BuyToCover ... from entry("X") that would fill while more than one
    entry is open in that direction now stops the run instead of closing the whole
    position, since the per-entry MultiCharts fills are unverified (#24).
    --lenient keeps the old behaviour with a warning; one open entry is unchanged.

Fixed

  • Inside a strategy, NumWinTrades, NumLosTrades, NumEvenTrades,
    PercentProfit, LargestWinTrade, LargestLosTrade, MaxConsecWinners,
    MaxConsecLosers, TotalBarsWinTrades, TotalBarsLosTrades,
    TotalBarsEvenTrades, AvgBarsWinTrade, AvgBarsLosTrade and
    AvgBarsEvenTrade always read 0. The engine counted closed trades but never
    passed those counts to the strategy. They now update on every bar, at the same
    point as TotalTrades and GrossProfit. The native kernel still refuses these
    words and falls back to the Python engine with a message.
  • A crosses above B and crosses below on the Python path silently never
    fired when an operand was not a series: a function call such as
    Average(Close, 10), a literal, or an offset such as Close[3]. Each such
    operand now keeps its own hidden history, filled at the start of every bar, so
    the strategy trades exactly as if the operand were first assigned to a
    variable. Value1..Value99 used directly as an operand also never fired;
    they now keep their history like a declared variable starting at 0. An operand
    that can change within the bar (such as Value1 + 1 or MarketPosition) is
    refused at transpile time, with its line, and the runtime raises instead of
    returning false when it is handed a single value. The native kernel still
    refuses these operands and falls back to the Python path with its usual
    message.
  • crosses above / crosses below against a constant level now fire. A literal
    (X crosses above 0) was treated as "no series" and never crossed, and a side
    that is all zeros (a declared Z(0)) was skipped as warm-up padding, so the
    cross never started. Leading zeros are now skipped only on a side that has a
    nonzero value; the warm-up skip for indicator pairs is unchanged, and so are
    all existing digests. The native kernel computes crosses the same way.
  • A stray word after an order price (for example the unsupported
    + 2 Ticks Stop) is now a syntax error that names that word, instead of an
    "unimplemented keywords" report that listed the valid stop as well.
  • The docs/USAGE.md sections "Python (mirror dialect) to EasyLanguage", "Your
    own data" and "Other instruments" create out/ themselves, so they no longer
    fail with FileNotFoundError when run on their own; the mirror section shows
    el_emit's full output. The docs test now clears out/ at each section.

PowerBridge 0.6.0

Choose a tag to compare

@hudsonwa hudsonwa released this 22 Oct 07:26
efec456

Originally released on 2026-10-21. This release page was re-created, with its original assets, when the repository was recreated on 2026-10-22, so its timestamp shows that date. See the CHANGELOG.

Added

  • --max-entries-per-direction N for pl_run and pl_oracle
    (max_entries_per_direction=N in run_el / run_oracle): a Buy or
    SellShort in the open position's direction is refused while N entries are
    open; reversals still fill. N=1 follows MultiCharts' documented default
    (not verified against a capture). The default stays unlimited, so existing
    digests do not change. The native kernel supports it; an older kernel build
    falls back to Python with a note.

Changed

  • transpile(src) now returns the runnable dialect by default, the same
    code pl_transpile writes and pl_run executes. Before, the library default
    was the clean mirror dialect, which keeps no cross-bar _state: EL Variables
    reset every bar, so a stateful strategy run from it silently produced zero or
    wrong orders. The mirror dialect (input for el_emit) now needs
    transpile(src, dialect="mirror"); persist=False still works. The bar loop
    refuses mirror-dialect strategies with a one-line error naming the fix.
    The pl_transpile CLI is unchanged (--no-persist still emits the mirror).
  • Tests: the public tier is also a set of pytest tests marked public_tier, so
    pytest runs everything and pytest -m public_tier runs exactly the tier.
    python tests/run_public_tier.py still works (stdlib only) and shares the
    same member list.
  • run_el, load_bars_csv and get_config can be imported from
    pl_transpiler directly; the old module paths keep working.
  • The runtime finds its loud stubs from a generated static list
    (tools/gen_loud_stubs.py, checked by a test) instead of parsing its own
    source at import time, so it works from .pyc-only or zipped installs. The
    installed stubs are unchanged.
  • README: tools/build_accel.sh needs an editable install (pip install -e .)
    for the console commands to see the built module.
  • The public API (transpile, run_el, run_oracle, load_bars_csv,
    load_bars, get_config, load_config_file and the catalog accessors)
    has type annotations, and the package ships py.typed. CI runs mypy on
    those modules. Runtime behaviour and digests do not change.
  • CI: every action in ci.yml and accel.yml is pinned to a commit SHA, the
    workflows run with a read-only token, Dependabot watches actions, cargo and
    pip, Python 3.14 joins the test matrix, and one pytest job uploads a
    coverage report.
  • ruff also checks pycodestyle E4/E7 and W rules.
  • Dependabot runs monthly with one grouped PR per ecosystem (at most two
    open) and skips major versions, which are upgraded deliberately.

Fixes

  • A strategy that declares arrays but no Variables or Inputs no longer fails
    with NameError: _state in the trace and runnable dialects.

Re-published on 2026-10-22, when the repository was recreated. The tag, notes and files are the originals.