
This article elaborates on a trend trading strategy based on the Relative Strength Index (RSI) low-high point divergence. The strategy captures potential trend reversal opportunities by identifying divergences between price and RSI indicators, providing traders with precise entry and exit signals. The strategy uniquely combines visual signals and technical indicator analysis to enhance the accuracy and timeliness of trading decisions.
The core principle is based on the RSI low-high point divergence theory. Key implementation steps include:
The Dynamic RSI Low-High Point Divergence Trend Strategy provides traders with an efficient trend trading method through precise technical indicator analysis and visual signals. Continuous optimization and risk management can help maintain stable performance across different market environments.
/*backtest
start: 2024-03-31 00:00:00
end: 2025-03-29 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/
//@version=6
strategy("RSI Divergence Strategy - Visible Signals", overlay=true)
// 1. Basic Inputs (Keep it simple)
rsiLength = input.int(14, "RSI Length")
lookback = input.int(10, "Lookback Period", minval=5)
oversold = input.int(30, "Oversold Level")
overbought = input.int(70, "Overbought Level")
// 2. Calculate Indicators
rsi = ta.rsi(close, rsiLength)
priceLow = ta.lowest(low, lookback)
priceHigh = ta.highest(high, lookback)
rsiLow = ta.lowest(rsi, lookback)
rsiHigh = ta.highest(rsi, lookback)
// 3. Simple Divergence Detection
bullishDiv = low == priceLow and rsi > rsiLow and rsi < oversold
bearishDiv = high == priceHigh and rsi < rsiHigh and rsi > overbought
// 4. Visual Signals (Large and Clear)
plotshape(bullishDiv, "Buy", shape.triangleup, location.belowbar,
color=color.new(color.green, 0), size=size.large)
plotshape(bearishDiv, "Sell", shape.triangledown, location.abovebar,
color=color.new(color.red, 0), size=size.large)
// 5. Optional: Add Background for Better Visibility
bgcolor(bullishDiv ? color.new(color.green, 90) : bearishDiv ? color.new(color.red, 90) : na)
// 6. Basic Strategy Execution
if bullishDiv
strategy.entry("Long", strategy.long)
if bearishDiv
strategy.entry("Short", strategy.short)
// 7. Debugging Table (To verify values)
var table debugTable = table.new(position.top_right, 4, 1)
if barstate.islast
table.cell(debugTable, 0, 0, "RSI: " + str.tostring(rsi))
table.cell(debugTable, 1, 0, "Price Low: " + str.tostring(priceLow))
table.cell(debugTable, 2, 0, "RSI Low: " + str.tostring(rsiLow))
table.cell(debugTable, 3, 0, "Signal: " + (bullishDiv ? "BUY" : bearishDiv ? "SELL" : "NONE"))
// Test Settings (paste these above the strategy call)
//rsiLength := 5
//lookback := 5
//oversold := 20
//overbought := 80