Skip to content

Time window

Conditions core.timewindow Version 1.0.0

Only on weekdays, only during the day, not on weekends. Is true when a candle closes inside the window, because that is when the alert would go out. Combined with AND this creates quiet hours, such as no alerts at night. A window from 22 to 6 spans midnight.

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

Direction Pin Type Note
Input – – No inputs: the data comes straight from the source.
Output in window 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
From (hour) from 8 from 0 to 23, whole number –
Until (hour) to 22 from 0 to 24, whole number –
Days days Mon–Sun (all) Mon–Sun · Mon–Fri · Sat–Sun –
Time zone timezone · under “More” Europe/Berlin IANA time zone such as Europe/Berlin, at most 64 characters IANA time zone such as Europe/Berlin. Daylight saving time is handled.

Quiet hours: push only arrives on weekdays between 8:00 and 22:00 when the RSI is below 30.

Example chain: Candle, RSI, Compare, Time window, AND, PushConnections: Candle → RSI, RSI → Compare, Compare → AND, Time window → AND, AND → Push.CandleBTC/USDT · Binance · 1hRSI14 periodsCompareRSI 14 below 30Time windowMon–Fri · 8:00 AM–10:00 PMANDall inputs truePushat most every 4 h

On the board it reads: Mon–Fri · 8:00 AM–10:00 PM

Chain as JSON

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

timewindow.json
{
"name": "Example: Time window",
"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": "w1", "type": "core.timewindow", "position": { "x": 40, "y": 170 }, "settings": { "days": "weekdays", "from": 8, "to": 22 } },
{ "id": "a1", "type": "core.and", "position": { "x": 700, "y": 40 }, "settings": {} },
{ "id": "p1", "type": "core.push", "position": { "x": 920, "y": 40 }, "settings": {} }
],
"edges": [
{ "from": "c1.close", "to": "r1.in" },
{ "from": "r1.out", "to": "k1.in" },
{ "from": "k1.out", "to": "a1.in0" },
{ "from": "w1.out", "to": "a1.in1" },
{ "from": "a1.out", "to": "p1.in" }
]
}
  • Search also finds it under: time, weekend, night, quiet hours, weekdays.