Activator
The Activator node reads the last non-null value of its input signal. If that value is non-zero, it sets the global activated flag to true on the graph engine. This flag remains true until a Deactivator node explicitly turns it off — it does not automatically reset each bar.
How It Works
- 1The node scans the input array from the end, finding the last non-null, non-undefined value.
- 2If that value is non-zero (truthy),
engine.setActionActivated(true)is called. - 3If the last value is zero or null, the activated flag is not changed — it holds whatever state was set previously.
- 4The output
activatedreflects the current engine state after the check.
Parameters
This node has no configurable parameters. It operates purely on its input signal.
Inputs & Outputs
| Port | Type | Description |
|---|---|---|
| Input | ||
| input | (number | null)[] | Boolean signal. A non-zero last value activates the strategy. |
| Output | ||
| activated | boolean | Current activation state of the graph engine after processing. |
Use Cases
Trend-gated entry
Connect a Compare node (e.g. price > 200-period MA) to Activator. Entry signals only execute while the activation flag is true. Connect a second Compare (price < 200-period MA) to Deactivator to disable entries in downtrends.
Session-based activation
Fire Activator when a time-based condition becomes true (market open) and Deactivator when it becomes false (market close). This gates all risk logic to active trading hours only.