Documentation for Deptle Terminal.
Guides for setup, scripting, troubleshooting, and more.
Numeric Built-ins
Use these helpers for common math inside strategy expressions.
abs(x),min(a, b),max(a, b),clamp(x, lo, hi).sqrt(x),exp(x),log(x),sin(x),cos(x),tan(x),pow(x, y).min/max/clamprequire same-typed args after DSL type checks.
Fixed-Point Helpers
Use these helpers whenever you want quantities and prices to scale correctly.
base(literal): compile-time conversion to base-scaled fixed-point quantity (10^base_scale, default10^8).price(literal): compile-time conversion to price-scaled integer (10^price_scale, default10^8).base_units(i64): converts whole units into base-scaled quantity.as_base(expr): cast marker carrying quantity semantics without extra runtime math.
base(...) and price(...) accept literal forms (int/float/string literal), not arbitrary runtime expressions.
Casts, RNG, and Portfolio Functions
These helpers cover type conversion, randomization helpers, and portfolio lookups.
int(x),float(x).rand_u32(salt).rand_ppm(max_ppm, salt).portfolio_score_live(asset_id),portfolio_score(asset_id).portfolio_rank_desc(asset_id),portfolio_rank_asc(asset_id).
Length & Indexing
len and indexing stay safe even when a value would normally go out of bounds.
len(self.<state_array>)andlen(self.<extra_buffer>)are supported.- Negative indexes are translated from end, then clamped into valid bounds.
- Out-of-range indexing saturates to nearest valid element.
- If an
Extrabuffer is absent/empty, indexed reads return0/0.0safely.
Operators
These are the arithmetic, comparison, boolean, and bitwise operators you can use in the DSL.
- Arithmetic:
+,-,*,/,//,%. - Bitwise:
&,|,^,~,<<,>>(i64 operands). - Shift amounts are clamped to
[0, 63]for deterministic behavior. - Comparisons:
<,<=,>,>=,==,!=(including chained comparisons). - Boolean:
and,or,not. //and%follow deterministic floor/mod helpers; divide/mod by zero returns0in these integer paths.
Need help?
If launch fails, include your loader version, OS, and latest crash log so support can reproduce the issue quickly.