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

SettingDefaultRangeWhat it does
sessionasiaasia, london, new_york, london_killzone, new_york_killzoneThe trading session (Admin › Settings › Trading sessions). Needs a small timeframe that divides the session times, e.g. 1m, 5m or 15m.
session_bars3001 to 5000Candles replayed at start so the prior session is known (at least one day of the node's timeframe: 5m = 288).

What it gives

OutputWhat it is
In the sessionTrue while the candle is inside the session.
Session openTrue on the first candle of a session.
Session high so farHigh of the session so far (provisional).
Session low so farLow of the session so far (provisional).
Prior session highHigh of the last completed session.
Prior session lowLow 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