Supertrend Trend Rider
Supertrend Trend Rider is a strategy that trades XAUUSD on 1-hour bars. It takes long trades only, adds up to 2 entries in the same direction and keep
trade management
strategy "Supertrend Trend Rider"market: XAUUSDbars: 1hdirection: longpyramiding: 2min_distance: 300 pointsinput atr_length = 10input factor = 3.0trend = supertrend(atr_length, factor)when trend.direction == 1 and crosses_above(close, ema(close, 21)):buy risk: 0.75%, stop: trend.line, target: 4R, tag: "rider":breakeven at: 1R, offset: 50 pointspartial 25% at: 2Rtrail by: atr(14) * 2, after: 2Rexit when: trend.direction == -1plot trend.line, color: if trend.direction == 1 then green else red, width: 2Supertrend Trend Rider is a strategy that trades XAUUSD on 1-hour bars. It takes long trades only, adds up to 2 entries in the same direction and keeps at least 300 points between entries.
You can change 2 inputs: atr_length (default 10) and factor (default 3.0).
It calculates trend as the Supertrend (length atr_length, multiplier factor).
When trend.direction is 1 and the close crosses above the 21-bar EMA of the close, it buys at market, risking 0.75% of the balance, with a stop at trend.line, with a target 4R from the entry and tagged "rider"; once open, it moves the stop to breakeven at 1R plus 50 points, closes 25% at 2R, trails the stop by 2 × the 14-bar ATR once the trade reaches 2R and exits when trend.direction is -1.
On the chart, it plots trend.line.