Unit bugs
A percent read as dollars. A distance read as a price. They compile fine elsewhere.
The plumbing is done: a type system for units, 24 written fill rules, tests that repeat exactly, and one runner for replay and live. You write the idea, not the framework.
Percent, distance, price, money, R and duration are tracked through inputs and arithmetic.
The tests rewrite the future and check that the past did not move.
Same script, inputs and bars give the same result to the last digit.
A percent read as dollars. A distance read as a price. They compile fine elsewhere.
One wrong index and the backtest has seen the future.
Two code paths means two results.
Percent, distance, price, money, R and duration are tracked through inputs and arithmetic. The engine works units out from the code, not the text.
Read more about units are typesThe tests rewrite the future and check that the past did not move.
Read more about no look-ahead, and testedSame script, inputs and bars give the same result to the last digit. Live uses the same runner as replay.
Read more about same answer every timeFunctions, types, enums, lists, lambdas, pattern matching, state and versioned libraries.
Read more about a real language underneathFull EBNF for building highlighters, linters and tools.
Read more about published grammar50 diagnostic codes. A code is never reused for a new meaning.
Read more about stable error codesTypes, functions that may trade, and functions that may not. A plain fn that tries to place an order is a compile error.
type Level:price: pricetouched: int = 0formed_at: timeenum Regime: trending, ranging, volatilefn swing_strength(len: int) -> number:up = highest(high, len) - closedown = close - lowest(low, len)return (down - up) / atr(14)action fn enter_long(size_risk: percent = 1%) -> bool:buy risk: size_risk, stop: 20 pips, target: 2Rreturn trueNot yet. A public API and a command-line tool are planned. Today the language runs inside the AlgoBars Terminal.
By 24 written, numbered rules. Market orders fill at the next bar's open. Inside a bar the 1-minute path is used, and when it cannot tell, the stop fills first. See the execution rules.
No. Fills carry no spread, commission, fees, swaps or slippage, and the docs say so plainly.
Build one thing. Read it back. Test it.
Try the language free$0 a month · No card needed · Not a trial
Trading is risky. You can lose money. It is not right for everyone.