EngineIndicators & Algorithms

Reading values

Read calculator results and configured state without confusing absence with neutral output.

Validate the producer's return shape before using it. Numeric indicators, structured decisions, and configured model instances have different contracts.

Numeric calculations

Check both type and finiteness for a numeric signal. A numeric zero can be valid, while null, undefined, NaN, and an unexpected string are not interchangeable with zero.

The normal cal(...) helper catches missing-model and calculation errors and returns null. A calculator can also return no value when its own data requirements are unmet. Inspect diagnostics to distinguish those cases.

The helper does not universally validate every returned historical row or prove that a finite output has sufficient coverage.

Configured instances

context.algos is built from the session's configured L2 tick instances. It exposes all, byName(name), and find(name, id?); it is not a registry of every L1 action, every position-only L2 instance, or every calculator.

Use the exact configured name and ID. A convenience property by name refers to the first instance for that name; use find when several variants exist.

Read the model's documented state or getter. Do not attach a generic .value, .ready, or .timestamp interpretation to all models. A present object establishes only that an instance was found.

Structured decisions

Injected helpers such as pureSides, rangeIntent, and positionMemory return structured information for SJS. They are not L3 policy objects and do not automatically submit entries.

For a helper result, inspect its documented readiness, direction, and alignment fields rather than coercing the whole object to a boolean. An object can exist while its evidence is incomplete or its recommendation is neutral.

Preserve provenance

When logging a decision, include the frame time, model name and ID, relevant parameters, and the particular values used. For model-specific timestamp fields, preserve their meaning rather than renaming every timestamp to “current.”

Next, establish readiness before combining outputs.

On this page