circuit_step
Puts the circuit opened with build_circuit together, one step after another, each checked as the lab checks it: a card type from the catalog (list_primitives), ports by name, settings inside their ranges and the cards the account's plan has. Steps run in order; one that cannot be done stops the rest and says why, and the ones before it stay done. The answer gives each card's id, ports and settings, the wires, and what the circuit still needs before it runs.
Args:
steps: One to twelve steps, each an object with an op:
{"op": "add_card", "type": "ticker", "id": "tk", "params": {"symbol": "KO"}, "after": "x"}
a card from the catalog; id (optional, lower case, like "tk") names it, after (optional)
places it to the right of another card; params left out keep the card's own
{"op": "connect", "from": "tk.ticker", "to": "tpl.ticker"} an output port to an input port
{"op": "set_card", "card": "bt", "params": {"horizon": "2y"}} changes settings
{"op": "remove_card", "card": "tk"}; {"op": "disconnect", "from": "...", "to": "..."}
{"op": "set_anchor", "date": "YYYY-MM-DD"} the day the forward test starts from (else the last
three years, up to the last month's end)
{"op": "clear"} empties the circuit
A Signal Module's rule is its config, one JSON object written as text, e.g. {"direction": "long",
"entry": {"indicator": "rsi", "params": {"length": 2}, "operator": "crosses_below", "value": 10},
"exit": {"indicator": "rsi", "params": {"length": 2}, "operator": "crosses_above", "value": 70},
"confirm": null}. A forward test covers three years at most; asked for more, it is held at three.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | Yes |