Rearview Download

55-day breakout with ATR stop

Donchian breakout with an ATR stop and ATR-based position size.

Strategies · breakout_atr.rvw

language 1
strategy "55-day breakout with ATR stop" {
  universe   members("SYN500")
  filter     close > sma(close, 100) and adv(20) > $100000
  enter long when close > donchian_high(breakout)[1]
  rank by    roc(close, 60)
  stop       3 x atr(20)
  size       risk 1% with stop, max 8 positions
  max position 25%
  exit when  close < donchian_low(20)[1]
  fill       next_open
  param      breakout = 30 in 20..60 step 10
}

Functions it uses

sma, adv, donchian_high, roc, atr, donchian_low

Try it

File ▸ New Script from Example adds it to a project. The examples read the sample’s index label, SYN500, and market ETF, SYNSPY; when your data has neither, a sheet asks what to read instead, one of your index labels (or every stock and ETF) and a ticker, so the example runs on your data as it is.

Before you trust what it does on your data, see whether it’s luck: Is this result luck?