Rearview Download

Weekly RSI in a monthly uptrend

Weekly momentum inside a monthly trend: buy when the weekly RSI turns up from a low reading while the monthly close is above its 10-month average. Weekly and monthly bars include the week or month in progress, built from the days so far.

Strategies · weekly_rsi_trend.rvw

language 1
strategy "Weekly RSI in a monthly uptrend" {
  universe   members("SYN500")
  trend      monthly(close) > monthly(sma(close, 10))
  wrsi       weekly(rsi(close, 5))
  enter long when trend and wrsi < low_level and wrsi > wrsi[1]
  rank by    -wrsi
  size       5% of equity, max 20 positions
  exit when  wrsi > 70 or not trend
  param      low_level = 35 in 20..50 step 5
}

Functions it uses

monthly, sma, weekly, rsi

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?