Breakout, out in thirds
A breakout that takes profits in thirds: sell a third of the position 8% above the entry, another third at 16%, and let the last third run to the 25% target or until the trend breaks. Each third is of the position held at the first step, so the steps don't shrink.
Strategies · ladder_scale_out.rvw
language 1
strategy "Breakout, out in thirds" {
universe members("SYN500")
filter close > sma(close, 100)
enter long when close > donchian_high(breakout)[1]
rank by roc(close, 60)
scale out 33% at 8%, 33% at 16%
target 25%
stop 3 x atr(20)
size risk 1% with stop, max 8 positions
exit when close < donchian_low(20)[1]
param breakout = 30 in 20..60 step 10
}
Functions it uses
sma, 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?