Strategy vault / Trend following
RSI Trend Tracking Long Only Strategy
This strategy implements a long only trend tracking strategy based on the RSI indicator. It goes long when RSI reaches oversold level and adopts fixed take profit and stop loss ratios. The strategy is simple and…

Overview
This strategy implements a long only trend tracking strategy based on the RSI indicator. It goes long when RSI reaches oversold level and adopts fixed take profit and stop loss ratios. The strategy is simple and straightforward, suitable for bull market.
Strategy Logic
The strategy uses RSI indicator to determine entry signals. It goes long when RSI drops below the oversold level of 25. After entering, fixed take profit and stop loss levels are set based on entry price. Specifically, take profit level is 7% above entry price and stop loss level is 3.5% below entry price.
The strategy only goes long and does not go short. It is a trend tracking strategy. It aims to capture the upward trend after the price bounces back from oversold RSI levels. When RSI is oversold, it indicates the price may have short term overselling. Going long at this point can benefit from the rebound.
Advantage Analysis
The advantages of this strategy are:
The logic is clear and simple, easy to understand and implement.
It only goes long, avoiding risks associated with regularity FD003.
Long signals come from RSI indicator, which effectively identifies oversold reversal opportunities.
Adopting fixed take profit/stop loss ratios controls single trade loss.
Risk Analysis
There are also some risks with this strategy:
It works better in bull market and cannot profit in bear market.
It misses opportunities to enter on new high breakouts.
Fixed stop loss ratio cannot adapt to changing market volatility.
Improper RSI parameter settings may lead to overtrading or insufficient signals.
Improvement Areas
The strategy can be improved from the following aspects:
Adding short side strategy to profit from bear market.
Adding new entry conditions like new high breakout or pattern signals to improve accuracy.
RSI parameters can be optimized through training to reduce errors.
Stop loss mechanism can become more intelligent, combining ATR to adjust based on volatility.
Conclusion
In summary, this strategy has clear logic to go long on oversold RSI levels and track bull trend. Pros are simplicity and straightforwardness while cons are only working for bull market and much room for improvement. It can serve as a baseline long side trend tracking strategy. More conditions, filters and indicators could be introduced to turn it into a reliable positive swing system.
Parameters
| Name | Default | What it controls |
|---|---|---|
| v_input_1 | 14 | RSI Length |
| v_input_2 | 25 | Overbought Level |
| v_input_3 | 0.07 | Long Take Profit % |
| v_input_4 | 0.035 | Long Stop Loss % |
Source Pine Script
/*backtest
start: 2023-12-28 00:00:00
end: 2024-01-03 00:00:00
period: 3m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("RSI BENI strategy (Long Only)", overlay=true, shorttitle="RSI BENI Long")
length = input(14, title="RSI Length")
overSold = input(25, title="Overbought Level")
price = close
vrsi = ta.rsi(price, length)
// Plot Einstiege und Levels im Chart für überverkaufte Zonen
plotshape(series=strategy.position_avg_price > 0 and vrsi[1] <= overSold and vrsi > overSold,
title="Long Entry",
color=color.green,
style=shape.triangleup,
size=size.small,
location=location.belowbar)
long_tp_inp = input(0.07, title='Long Take Profit %')
long_sl_inp = input(0.035, title='Long Stop Loss %')
long_take_level = strategy.position_avg_price * (1 + long_tp_inp)
long_stop_level = strategy.position_avg_price * (1 - long_sl_inp)
plot(long_take_level, color=color.green, title="Long Take Profit Level", linewidth=2)
plot(long_stop_level, color=color.red, title="Long Stop Loss Level", linewidth=2)
if (not na(vrsi))
if vrsi < overSold
// Long Entry
strategy.entry("Long", strategy.long, comment="enter long")
strategy.exit("Take Profit/Stop Loss", "Long", limit=long_take_level, stop=long_stop_level)
Published by ChaoZhang on the FMZ strategy square · last modified 2024-01-05. 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/RSI-Trend-Tracking-Long-Only-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
- Adaptive ATR and RSI Trend Following Strategy with Trailing Stop LossPine Script · Trend following · 1h
- Advanced Supertrend Indicator Trading Mechanism Optimization StrategyPine Script · Trend following · 1d
- BB Percentage Index Trend Fading StrategyPine Script · Trend following · 1h
- Bollinger Bands and RSI Trend Following StrategyPine Script · Trend following · 1h
- Dual ATR Channel Trend Following StrategyPine Script · Trend following · 15m
- Dual Indicator Dynamic Trend Trading Strategy Multi dimensional Technical Analysis System Based on RSI and MACDPine Script · Trend following