Skip to content
Open RaamTrade

SDK012 — Blocked Builtin

<name>() is not supported in strategies. Only SDK methods and a limited set of built-in functions are available.

What it means

You called a Python built-in that RaamCode does not support. The transpiler refuses it at compile time.

Allowed built-ins

Function Notes
int(x), float(x), bool(x) Type conversions.
abs(x), min(...), max(...) Math basics. min / max take two or more arguments.
round(x, ndigits) Rounding.
print(...) Debug output to the Console / Log tab. See Python Subset.
len(...) In a strategy: a persistent-state list or dict. In a custom indicator: a Series.
sum(...) Custom indicators only — over a Series buffer. In a strategy body sum(...) raises this error.
range(n) For-loop iterable only: for i in range(n). A standalone range(...) call is refused.

Everything else is blocked. The math. standard library (math.sqrt, math.pi, …) is available without an import and is not affected by this rule.

Common offenders

Function Replacement
open(path) No file I/O. Data comes from Symbol().
eval(s), exec(s) No dynamic-code execution by design.
input() No I/O. Params take user input declaratively.
list(...), dict(...), set(...), tuple(...) No mutable collections. Use Series in a custom indicator.
map(...), filter(...), reduce(...) No closures. Use explicit for ... in range(n) with arithmetic.
sorted(...), reversed(...) No collections to sort.
sum(...), any(...), all(...) Blocked in a strategy body. Accumulate with for ... in range(n).
type(x), enumerate(...), zip(...) No introspection or iterator protocol.

Why

These calls either require collections (which RaamCode doesn’t have as persistent values), or they require I/O / dynamic-code execution, which the sandbox refuses.