Daily trend, intraday pullback
A daily trend with intraday entries, held overnight: while a stock's daily close is above its 50-day average, buy a pullback on 5-minute bars, and hold it under a stop until the daily trend breaks. Lookbacks count bars, so the days come from daily.
Intraday bars · intraday/daily_trend_overnight.rvw
language 1
strategy "Daily trend, intraday pullback" {
universe stocks
trend daily(close) > daily(sma(close, 50))
enter long when trend and time >= 10:00 and rsi(close, 6) < 25
exit when daily(close) < daily(sma(close, 50))
rank by daily(roc(close, 20))
size 10% of equity, max 5 positions
stop 4%
}
Functions it uses
Try it
These need stocks’ intraday bars, such as 5-minute files converted with rvw convert ohlcv. See Intraday bars.
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?