EngineIndicators & Algorithms

Configuration

Configure exact model names, lifecycle types, parameters, and instance identifiers.

A configured model and an on-demand calculator call are different things. Reading a model through context.algos does not create it, and calling cal(...) does not install a persistent model into the session.

Model configuration shape

The app model configuration uses name, type, and params. Names are registered identifiers such as sessionRegime, rather than the human-readable title of a guide.

This is a partial app-configuration example, not a complete app or an SJS script:

{
  "models": [
    {
      "name": "sessionRegime",
      "type": "all",
      "params": {
        "id": "fast",
        "interval": 1000,
        "plot": false
      }
    }
  ]
}

It gives the supported session model a recognizable instance ID and an update interval in milliseconds. It does not create a trading entry rule. Use the sessionRegime reference for the remaining parameters.

Choose the supported lifecycle type

Configured L1 models use tick, position, or all according to their implementation. Tick callbacks normally participate in the no-position path; position callbacks inspect existing positions. Some session models are mapped into shared L2 instances so they can maintain state across those paths.

L2 configuration is loaded separately from modelsL2. Do not copy a model into a different collection or lifecycle type merely because its name appears in a catalog.

Give repeated models distinct IDs

The instance ID belongs in the model's supported parameters. The example can be found with context.algos.find("sessionRegime", "fast") after the configuration has been loaded.

The facade matches exact registered names and optional instance IDs. Omitting an ID selects the first matching instance; it is ambiguous when you intend to distinguish several variants. A miss returns no instance and does not instantiate a replacement.

Set behavior explicitly

Use parameter types and units from the implementation and reference. Treat display defaults as guidance, not a reason to omit a critical execution switch. For an execution primitive, set its transmission behavior explicitly.

Save the app or Lab revision and start the intended run after configuration changes. Do not assume an edit reconstructs an already running model's state immediately.

Continue with reading values.

On this page