Then
- First A
- Then B
below 30, then Compare A/B within 6 candles
- B after A
First A, then B within candles. Waits for an order of events: first signal A must become true, then signal B within the set number of candles. The node is true on the candle where B follows A. That is how you build patterns like a breakout and pullback. Example: A is RSI below 30, B is price crosses above EMA 20, with 6 candles the alert fires when the price recovers within 6 hours after a sell-off.
What it looks like
Section titled “What it looks like”- input true
- output true
- false
Settings
Section titled “Settings”The settings appear on the right under “Properties” once you click the node on the board. Below each field you find the same explanation as here.
Within (candles)
Section titled “Within (candles)”Within how many candles after A signal B must follow. With 1-hour candles, 6 candles are six hours, 24 a day.
Example
Section titled “Example”Recovery after a sell-off: first the RSI drops below 30, then within 6 candles the price crosses above the EMA 20.
How to connect the nodes:
- Candle (Price) → RSI (Value)
- RSI (RSI) → Compare (Value)
- Candle (Price) → Moving average (Value)
- Candle (Price) → Compare A/B (A)
- Moving average (Average) → Compare A/B (B)
- Compare (true/false) → Then (First A)
- Compare A/B (true/false) → Then (Then B)
- Then (B after A) → Telegram (Trigger)
On the board it reads: below 30, then Compare A/B within 6 candles
Chain as JSON
To try it, copy it and paste it in the editor under “Import”. Importing creates a new chain.
{ "name": "Example: Then", "version": 1, "nodes": [ { "id": "c1", "type": "core.candle", "position": { "x": 40, "y": 40 }, "settings": { "pair": "BTC/USDT", "timeframe": "1h" } }, { "id": "r1", "type": "core.rsi", "position": { "x": 260, "y": 40 }, "settings": { "length": 14 } }, { "id": "k1", "type": "core.compare", "position": { "x": 480, "y": 40 }, "settings": { "operator": "below", "value": 30 } }, { "id": "e1", "type": "core.ma", "position": { "x": 260, "y": 170 }, "settings": { "kind": "ema", "length": 20 } }, { "id": "k2", "type": "core.compare-ab", "position": { "x": 480, "y": 170 }, "settings": { "operator": "crossesAbove" } }, { "id": "s2", "type": "core.sequence", "position": { "x": 700, "y": 40 }, "settings": { "bars": 6 } }, { "id": "t1", "type": "core.telegram", "position": { "x": 920, "y": 40 }, "settings": {} } ], "edges": [ { "from": "c1.close", "to": "r1.in" }, { "from": "r1.out", "to": "k1.in" }, { "from": "c1.close", "to": "e1.in" }, { "from": "c1.close", "to": "k2.a" }, { "from": "e1.out", "to": "k2.b" }, { "from": "k1.out", "to": "s2.first" }, { "from": "k2.out", "to": "s2.then" }, { "from": "s2.out", "to": "t1.in" } ]}Inputs and outputs
Section titled “Inputs and outputs”Only matching types connect: number series to number series (round pin), signal to signal (square), message to message (diamond).
| Direction | Pin | Type | Note |
|---|---|---|---|
| Input | First A | Signal (true/false) | required |
| Input | Then B | Signal (true/false) | required |
| Output | B after A | Signal (true/false) | – |
Good to know
Section titled “Good to know”- Warm-up with the default settings: 6 candles (this many extra candles are loaded by the replay before the value is reliable).
- Search also finds it under: order, then, sequence, retest, first then, pattern.
Technical details
Section titled “Technical details”True on candle i when B is true on i and A on at least one of the candles i − N to i − 1; A on the same candle does not count.
- Type in the chain:
core.sequence· Version 1.0.0 · Category keylogic - Settings in the chain:
bars(Within (candles)) - Pins in the chain: Input
first,then· Outputout - How a node is built
Version 2026.10.21.23 · Changelog