London Open Breakout

London Open Breakout is a strategy that trades GBPUSD on 5-minute bars. It holds at most 1 open trade and trades only during the London session.

sessions and timepending orders

london-open-breakout.abx
1strategy "London Open Breakout"
2market: GBPUSD
3bars: 5m
4max_open: 1
5trade_only: within sessions london
6
7input range_bars = 12
8input buffer = 2 pips
9
10range_high = highest(high, range_bars)
11range_low = lowest(low, range_bars)
12
13when time_of_day == 08:00 max 1 per day:
14buy stop: range_high + buffer, risk: 0.5%, stop_loss: range_low - buffer, target: 2R, expires: 24 bars, tag: "breakout"
15sell stop: range_low - buffer, risk: 0.5%, stop_loss: range_high + buffer, target: 2R, expires: 24 bars, tag: "breakout"
16
17when time_of_day >= 16:00:
18close_all tag: "breakout"
19cancel orders.pending(tag: "breakout")
20
21plot range_high, color: green, style: step
22plot range_low, color: red, style: step
What this script says

London Open Breakout is a strategy that trades GBPUSD on 5-minute bars. It holds at most 1 open trade and trades only during the London session.

You can change 2 inputs: range_bars (default 12) and buffer (default 2 pips).

It calculates range_high as the highest high of the last range_bars bars and range_low as the lowest low of the last range_bars bars.

When the time of day is 08:00 (at most 1 time per day), it buys with a stop order at range_high plus buffer, risking 0.5% of the balance, with a stop-loss at range_low minus buffer, with a target 2R from the entry, expiring after 24 bars and tagged "breakout"; it also sells with a stop order at range_low minus buffer, risking 0.5% of the balance, with a stop-loss at range_high plus buffer, with a target 2R from the entry, expiring after 24 bars and tagged "breakout".

When the time of day is at or above 16:00, it closes all trades tagged "breakout" and cancels pending orders tagged "breakout".

On the chart, it plots range_high and range_low.

Try this in the Terminal. AlgoBars is free: $0 a month, no card needed.

Create my free account