Strategy vault / Mean reversion
Ultra Long Period RSI Reversal Strategy
This strategy uses an ultra long period RSI indicator to generate trading signals based on RSI crossover with thresholds. Specifically, it adopts a very long RSI period, typically 50-100. Long signals are triggered…
This strategy uses an ultra long period RSI indicator to generate trading signals based on RSI crossover with thresholds.
Specifically, it adopts a very long RSI period, typically 50-100. Long signals are triggered when RSI crosses above oversold level. Short signals are generated on RSI crossing below overbought level.
The advantage of this strategy is the ultra long RSI can more precisely determine trend, filtering out short-term noise and avoiding whipsaws. However, RSI itself has lagging issues and cannot promptly detect reversals. Also, parameter tuning is required for different products.
In summary, the ultra long RSI reversal strategy suits medium-long term holding. Despite decent performance, attention is still required on trend change risks and timely stop loss to protect capital. Only with comprehensive risk management can steady profits be achieved in the long run.
Parameters
| Name | Default | What it controls |
|---|---|---|
| v_input_1 | 65 | length |
| v_input_2 | 40 | overSold |
| v_input_3 | 60 | overBought |
| v_input_4_close | 0 | price: close | high | low | open | hl2 | hlc3 | hlcc4 | ohlc4 |
Source Pine Script
/*backtest
start: 2023-09-03 00:00:00
end: 2023-09-10 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=3
// strategy("Kozlod - RSI Strategy - 1 minute", overlay = true, default_qty_type = strategy.percent_of_equity, default_qty_value = 100)
// Inputs
length = input(65)
overSold = input(40)
overBought = input(60)
price = input(close)
// RSI
vrsi = rsi(price, length)
if (crossover(vrsi, overSold))
strategy.entry("RsiLE", strategy.long, comment="RsiLE")
if (crossunder(vrsi, overBought))
strategy.entry("RsiSE", strategy.short, comment="RsiSE")
Published by ChaoZhang on the FMZ strategy square · last modified 2023-09-11. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.
Build this with AgenKit
A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/Ultra-Long-Period-RSI-Reversal-Strategy.md- npx agenkit install engineering-kit in your project
- Paste the command into your agent and approve each phase
- Get tests, backtest, risk controls and a paper-trading switch
Understand it first
Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.
Related specs
- ATR and EMA based Dynamic Take Profit and Stop Loss Adaptive StrategyPine Script · Mean reversion · 1h
- Adaptive Mean Reversion Trading Strategy Based on Chande Momentum OscillatorPine Script · Mean reversion · 1d
- Adaptive RSI Oscillator Dynamic Trading Strategy with Threshold OptimizationPine Script · Mean reversion · 1d
- Advanced 15 Minute Chart Trading Signal StrategyPine Script · Mean reversion · 3h
- Advanced Fibonacci Retracement Trend Following and Reversal Trading StrategyPine Script · Mean reversion · 3h
- Advanced Momentum EMA Trend Following with RSI Overbought Oversold Trading StrategyPine Script · Mean reversion · 1d