Skip to content

Compare

Conditions core.compare Version 1.0.0

Compare a value with a threshold: greater, less or crosses. Compares a value with a fixed threshold. “Crosses” is only true on the candle where the threshold is crossed (like ta.crossover and ta.crossunder).

Only matching types connect: number series to number series (round pin), signal to signal (square), message to message (diamond).

Direction Pin Type Note
Input Value in Number series required
Output true/false out Signal (true/false) –

The settings appear on the right under “Properties” once the node is selected on the board. Those marked “More” appear after clicking “More”.

Setting Default Allowed Meaning
Condition operator below (below) above · below · at least · at most · crosses above · crosses below · crosses –
Threshold value 30 – –

The comparison turns the RSI into a signal: true while the RSI is below 30. Telegram notifies you as soon as the signal becomes true.

Example chain: Candle, RSI, Compare, TelegramConnections: Candle → RSI, RSI → Compare, Compare → Telegram.CandleBTC/USDT · Binance · 1hRSI14 periodsCompareRSI 14 below 30Telegramlinked chat · at most every4 h

On the board it reads: RSI 14 below 30

Chain as JSON

To try it, copy it and paste it in the editor under “Import”. Importing creates a new chain.

compare.json
{
"name": "Example: Compare",
"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": "t1", "type": "core.telegram", "position": { "x": 700, "y": 40 }, "settings": {} }
],
"edges": [
{ "from": "c1.close", "to": "r1.in" },
{ "from": "r1.out", "to": "k1.in" },
{ "from": "k1.out", "to": "t1.in" }
]
}
  • Search also finds it under: below, above, crosses, threshold, condition.
  • Type in the chain: core.compare · Version 1.0.0 · Category key cond
  • Reference tests in the manifest: 2 (with fixed price data binance-btcusdt-1h-500)
  • How a node is built