The Rolling Sharpe rule measures the unannualized ratio of mean simple bar returns to their sample standard deviation over a rolling window. When that Sharpe meets your compare condition against a threshold, it fires a configured buy or sell.
Use it when you want entries only while recent bar returns look favorably skewed toward positive edge per unit of own-bar vol—not as a portfolio annualized Sharpe number.
When to use it
- Prefer longs when recent returns have positive mean relative to their volatility
- Avoid entries when the rolling Sharpe collapses below your floor
- As a filter: allow a pending signal only when Sharpe agrees with the pending side
What you’ll set in the app
Add Rolling Sharpe under entry, exit, increase, decrease, or reversal—or under filters for the same sections.
- Window — number of return bars in the sample (default 20; needs
window + 1closes) - Compare — Sharpe >, <, ≥, ≤, or ≈
- Threshold — e.g.
0for positive mean/stdev - Side when true — buy or sell when the condition holds
Until enough history exists or return stdev is zero, the rule does not fire (as a filter, that blocks agreement for that instance).
Tips
- This Sharpe is not annualized. Thresholds are mean/stdev of bar returns on your timeframe.
- Zero-volatility windows fail closed (no signal / gate block).
- As a filter, set side to match the signals you want to allow.
Example
Entry rules: Rolling Sharpe, window 20, Sharpe > 0, side buy, combined with RSI oversold. Entry only when recent returns have positive unannualized Sharpe and RSI agrees.
Entry filters: Same rule with side buy so a MACD long only passes when rolling Sharpe is positive.