OPEN-SOURCE SCRIPT

RSI Strategy with 125-Day High and Volume Filter

//version=6
strategy("RSI Strategy with 125-Day High and Volume Filter", overlay=true)

// Input variables
length = input(14, title="RSI Length")
overSold = input(30, title="Oversold Level")
overBought = input(70, title="Overbought Level")
price = close

// RSI Calculation
vrsi = ta.rsi(price, length)

// Conditions for RSI crossover
co = ta.crossover(vrsi, overSold)
cu = ta.crossunder(vrsi, overBought)

// 125-day high calculation
high_125 = ta.highest(high, 125)

// Crossing conditions for 125-day high
cross_above_high_125 = ta.crossover(price, high_125)
cross_below_high_125 = ta.crossunder(price, high_125)

// Volume condition: Check if current volume is at least 2 times the previous volume
volume_increased = volume > 2 * volume[1]

// Entry logic for RSI and 125-day high with volume filter
if (not na(vrsi))
if (co and volume_increased)
strategy.entry("RsiLE", strategy.long, comment="RsiLE")
if (cu and volume_increased)
strategy.entry("RsiSE", strategy.short, comment="RsiSE")

// Entry logic for 125-day high crossing with volume filter
if (cross_above_high_125 and volume_increased)
strategy.entry("BuyHigh125", strategy.long, comment="BuyHigh125")

if (cross_below_high_125 and volume_increased)
strategy.entry("SellHigh125", strategy.short, comment="SellHigh125")

// Plot the 125-day high for visualization
plot(high_125, title="125-Day High", color=color.orange, linewidth=2, style=plot.style_line)
Bands and Channels

Skrip open-source

Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menerbitkannya sebagai sumber terbuka, sehingga para trader dapat memahami dan memverifikasinya. Hormat untuk penulisnya! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Inggin menggunakan skrip ini pada chart?

Pernyataan Penyangkalan