PowerBridge transpiles EasyLanguage / PowerLanguage strategies to Python and backtests them bar by bar, with trade lists that match MultiCharts fill-for-fill on its ground-truth suites. It also goes back: a strategy written in PowerBridge's small Python "mirror dialect" (not general Python) is emitted as checked EasyLanguage. Pure Python standard library, no PyPI dependencies, no network; an optional Rust kernel runs the same backtests about 5x faster. Status: beta. It would rather stop than guess: unsupported keywords are reported, not approximated (status and scope, limitations). The keyword reference lists the 261 builtins PowerBridge covers: 254 run, and 7 transpile but stop at run time.
Python 3.9 or newer. In a fresh virtual environment (on Windows activate with
.venv\Scripts\activate), install the wheel attached to the
v0.13.1 GitHub Release:
python3 -m venv .venv && . .venv/bin/activate
python -m pip install -U pip
pip install https://github.com/hudsonwa/PowerBridge/releases/download/v0.13.1/powerbridge-0.13.1-py3-none-any.whlOr install the tagged release straight from the repository:
pip install "powerbridge @ git+https://github.com/hudsonwa/PowerBridge@v0.13.1"The optional native fast path is a separate wheel per platform,
powerbridge_accel-0.13.1-cp39-abi3-<platform>.whl on the same release page;
see the platform table. It is also on PyPI:
pip install powerbridge-accel==0.13.1. The core powerbridge package is
distributed through GitHub Releases.
The powerbridge distribution (import name pl_transpiler) installs five
commands: pl_transpile, pl_run, pl_oracle, el_emit and pl_examples.
Write the bundled example strategy and synthetic bars into ./examples/
(it never overwrites; in a clone of this repository they are already there):
pl_examplesBacktest the example strategy on the synthetic bars and print its trade digest:
pl_oracle examples/ma_cross.el examples/NQ_sample_bars.csvpowerbridge-trade-digest v2
fills: 3
round_turns: 1
sha256: f2ab719a0985319cad5109e9ba8879a0fd6eac4849725920ba817c13fe0474da
To see the run bar by bar (pl_run executes generated Python, so only run
files you trust):
pl_run examples/ma_cross.el examples/NQ_sample_bars.csv --columns MarketPosition,NetProfit,TotalTrades[pl_run] 140 bars, 119 rows, 3 fills, 1 round-turns, max-bars-back 21 (auto) [python]
MarketPosition,NetProfit,TotalTrades
0,0.00,0
...
0,1343.80,1
...
1,1343.80,1
The [pl_run] line is a status line on stderr. Which output goes where, the
[python] / [native] engine tag and the warm-up bars it skips are in
the usage guide, which also covers
--fills-csv and your own strategy and bars.
pl_oracle prints a SHA-256 digest of the exact trade list; digests on the
shipped sample bars are pinned in the tests and match on the native and Python
paths, and parity with MultiCharts is checked against licensed per-bar
captures that cannot ship here (verification).
| Doc | What it covers |
|---|---|
| Usage guide | The example step by step, your own strategy and bars, Python to EasyLanguage, other instruments |
| Writing a strategy in Python | The mirror dialect from scratch |
| Architecture | How it works: pipeline, bar loop, native kernel |
| Design decisions | Why it is built this way |
| Verification | What you can check yourself; the trade digest |
| Limitations | Validation scope, unsupported keywords, known gaps |
| API and CLI reference | Library API and every command's flags |
| Keyword reference | Every covered builtin |
| Native fast path | Install, speed, fallback |
| Contributing | Running the tests, opening changes |
| Changelog | Release history |
Also: bars and captures, LLM dialect notes, AGENTS.md for agents and scripts.
Apache License 2.0. See LICENSE and NOTICE.
MultiCharts / TradeStation keyword PDFs and any resources/ or db/ reference
pack are third-party copyright and are not in this repository. The shipped
replacement is pl_transpiler/tools/pl_signatures.jsonl plus
mc_verified_builtins.txt.
PowerBridge is independent. It is not affiliated with TradeStation Technologies, Inc. or MultiCharts (MCT Limited). Those names are used only to describe compatibility.
See CONTRIBUTING.md, which also covers running the tests and why a run without the native kernel leaves out the tests that need it. Open an issue before a large change. Small fixes can be a pull request on their own.
Development started in a private repository; this public repository begins at the 0.2.0 export. Changes since then are made here in the open.