Six-Confirmation Momentum

Six-Confirmation Momentum is a strategy that trades XAUUSD on 5-minute bars. It holds at most 1 open trade and stops for the day after losing 3%.

confirmationstrade managementother bar sizesuses a library or indicatorsmart moneysessions and time

six-confirmation-momentum.abx
1strategy "Six-Confirmation Momentum"
2market: XAUUSD
3bars: 5m
4max_open: 1
5max_daily_loss: 3%
6
7use indicator "Trend Ribbon" v3 as ribbon (fast: 10, slow: 30)
8
9input risk = 0.5%
10
11confirmations long_setup:
12trend: ema(close, 50) > ema(close, 200)
13higher_tf: bars(bars: 1h).close > ema(bars(bars: 1h).close, 50)
14momentum: rsi(close, 14) between 55 and 70
15volume: volume > sma(volume, 20) * 1.5
16structure: break_of_structure(direction: up)
17ribbon: ribbon.up and ribbon.strength > 0.5
18require: all
19
20when long_setup.passed as long_entry every 4th within sessions london, new_york:
21buy risk: risk, stop: lowest(low, 10) - 5 points, target: 3R, tag: "momentum":
22breakeven at: 1R
23partial 50% at: 2R
24trail by: atr(14) * 1.5, after: 2R
25exit after: 60 bars
26
27on exit(trade):
28log "{trade.tag} closed at {trade.r:0.00}R after {long_entry.triggers} triggers"
What this script says

Six-Confirmation Momentum is a strategy that trades XAUUSD on 5-minute bars. It holds at most 1 open trade and stops for the day after losing 3%.

It uses the indicator "Trend Ribbon" (version 3) as ribbon, with fast set to 10 and slow set to 30.

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

long_setup passes when all of these 6 conditions are true: trend (the 50-bar EMA of the close is above the 200-bar EMA of the close); higher_tf (the close of 1-hour bars is above the 50-bar EMA of the close of 1-hour bars); momentum (the 14-bar RSI is between 55 and 70); volume (volume is above 1.5 × the 20-bar SMA of volume); structure (a bullish break of structure); ribbon (ribbon.up and ribbon.strength is above 0.5).

When long_setup passes (on every 4th time and during the London and New York sessions), it buys at market, risking risk of the balance, with a stop at the lowest low of the last 10 bars minus 5 points, with a target 3R from the entry and tagged "momentum"; once open, it moves the stop to breakeven at 1R, closes 50% at 2R, trails the stop by 1.5 × the 14-bar ATR once the trade reaches 2R and exits after 60 bars.

When a trade closes, it logs "{trade.tag} closed at {trade.r:0.00}R after {long_entry.triggers} triggers".

This description may be incomplete because the script has errors.

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

Create my free account