Trading session
Whether a candle is inside a trading session, with the session's high and low and the last session's high and low.
Trading session from the configured list (local hours of an IANA time zone). in_session while the candle is inside an instance; session_open on its first candle; current_high/low = the instance so far; prior_high/low = the last completed instance. A candle that crosses a session start or end has no values.
Trading session is a structure detector: it marks price structure on the chart and counts against the plan's detector limit.
Settings
| Setting | Default | Range | What it does |
|---|---|---|---|
| session | asia | asia, london, new_york, london_killzone, new_york_killzone | The trading session (Admin › Settings › Trading sessions). Needs a small timeframe that divides the session times, e.g. 1m, 5m or 15m. |
| session_bars | 300 | 1 to 5000 | Candles replayed at start so the prior session is known (at least one day of the node's timeframe: 5m = 288). |
What it gives
| Output | What it is |
|---|---|
| In the session | True while the candle is inside the session. |
| Session open | True on the first candle of a session. |
| Session high so far | High of the session so far (provisional). |
| Session low so far | Low of the session so far (provisional). |
| Prior session high | High of the last completed session. |
| Prior session low | Low of the last completed session. |
What it reads
It reads the whole candle (open, high, low, close and volume).
Warm-up
With its default settings, Trading session needs 300 closed candles before its first value. A backtest loads them before its start date, so the first trade can already use it.
Test it
Copy this sentence into the Algonney chat to backtest it:
Backtest a strategy on BTC that uses Trading session with its default settings