Quiet Hours Trend

Quiet Hours Trend is a strategy that trades USDJPY on 15-minute bars. It holds at most 2 open trades (1 per side) and never risks more than 2% across

sessions and time

quiet-hours-trend.abx
1strategy "Quiet Hours Trend"
2market: USDJPY
3bars: 15m
4max_open: 2
5max_open_per_side: 1
6max_total_risk: 2%
7
8input risk = 0.5%
9
10fast_line = ema(close, 9)
11slow_line = ema(close, 34)
12
13when crosses_above(fast_line, slow_line) from 01:00 to 11:00 UTC skip first 1 max 3 per session cooldown 30m:
14buy risk: risk, stop: 20 pips, target: 1.8R
15
16when crosses_below(fast_line, slow_line) from 01:00 to 11:00 UTC skip first 1 max 3 per session cooldown 30m:
17sell risk: risk, stop: 20 pips, target: 1.8R
18
19when hour >= 20:
20close_all
What this script says

Quiet Hours Trend is a strategy that trades USDJPY on 15-minute bars. It holds at most 2 open trades (1 per side) and never risks more than 2% across open trades.

You can change one input: risk (default 0.5%).

It calculates fast_line as the 9-bar EMA of the close and slow_line as the 34-bar EMA of the close.

When fast_line crosses above slow_line (between 01:00 and 11:00 UTC, ignoring the first time, at most 3 times per session and waiting at least 30 minutes between actions), it buys at market, risking risk of the balance, with a stop 20 pips from the entry and with a target 1.8R from the entry.

When fast_line crosses below slow_line (between 01:00 and 11:00 UTC, ignoring the first time, at most 3 times per session and waiting at least 30 minutes between actions), it sells at market, risking risk of the balance, with a stop 20 pips from the entry and with a target 1.8R from the entry.

When the hour is at or above 20, it closes all trades.

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

Create my free account