Overview
This page documents 3 operators (role:CONTROL).
ConditionalGate
Gate operator that outputs 1 or 0 based on condition. Used to conditionally enable/disable downstream operators (especially semantic operators that make API calls). Output:- 1.0: Condition is met (gate open)
- 0.0: Condition is not met (gate closed)
Open gate when ATR above 2%
graph.add_node(“high_vol_gate”, ConditionalGate( condition_input=Input(“atr”, timeframe=“1h”, lookback=1), threshold=0.02, comparison=“gt”, ))Open gate when RSI below 30 OR RSI above 70 (using two gates)
graph.add_node(“oversold_gate”, ConditionalGate( condition_input=Input(“rsi”, timeframe=“1h”, lookback=1), threshold=30, comparison=“lt”, )) graph.add_node(“overbought_gate”, ConditionalGate( condition_input=Input(“rsi”, timeframe=“1h”, lookback=1), threshold=70, comparison=“gt”, ))Combine gates with OR logic (max of two gate values)
graph.add_node(“extreme_rsi_gate”, GateOr([ Input(“oversold_gate”, timeframe=“1h”, lookback=1), Input(“overbought_gate”, timeframe=“1h”, lookback=1), ])) Role:CONTROL | Ephemeral: No
Parameters
Usage
Source Code
Fullcompute() implementation — no hidden logic.
apps/trading/operators/control/gate.py
GateOr
Combine multiple gates with OR logic (max of gate values). Role:CONTROL | Ephemeral: No
Parameters
Usage
Source Code
Fullcompute() implementation — no hidden logic.
apps/trading/operators/control/gate.py
GateAnd
Combine multiple gates with AND logic (min of gate values). Role:CONTROL | Ephemeral: No
Parameters
Usage
Source Code
Fullcompute() implementation — no hidden logic.
apps/trading/operators/control/gate.py
Related Pages
Operator Protocol
How operators implement the compute() interface
StatefulGraph
How operators compose into a DAG

