OPEN-SOURCE SCRIPT
Мой скрипт

//version=5
indicator("Momentum Reversal Zones Strategy", overlay=true)
// === INPUTS ===
rsiLength = input.int(14, title="RSI Length")
stochK = input.int(14, title="Stochastic %K")
stochD = input.int(3, title="Stochastic %D")
rsiOverbought = input.int(70, title="RSI Overbought Level")
rsiOversold = input.int(30, title="RSI Oversold Level")
// === RSI ===
rsi = ta.rsi(close, rsiLength)
// === Stochastic Oscillator ===
k = ta.stoch(close, high, low, stochK)
d = ta.sma(k, stochD)
// === Buy Signal Conditions ===
rsiBuy = rsi < rsiOversold
stochBuy = ta.crossover(k, d) and k < 20
buySignal = rsiBuy and stochBuy
// === Sell Signal Conditions ===
rsiSell = rsi > rsiOverbought
stochSell = ta.crossunder(k, d) and k > 80
sellSignal = rsiSell and stochSell
// === Plot signals ===
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.arrowup, size=size.small, text="BUY")
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.arrowdown, size=size.small, text="SELL")
// === Alerts ===
alertcondition(buySignal, title="Buy Alert", message="Buy Signal: RSI < 30 and Stochastic Bullish Crossover")
alertcondition(sellSignal, title="Sell Alert", message="Sell Signal: RSI > 70 and Stochastic Bearish Crossover")
// === Show RSI and Stochastic in separate panel ===
plot(rsi, title="RSI", color=color.blue, linewidth=1, display=display.none)
hline(rsiOverbought, "Overbought", color=color.red, linestyle=hline.style_dotted, display=display.none)
hline(rsiOversold, "Oversold", color=color.green, linestyle=hline.style_dotted, display=display.none)
indicator("Momentum Reversal Zones Strategy", overlay=true)
// === INPUTS ===
rsiLength = input.int(14, title="RSI Length")
stochK = input.int(14, title="Stochastic %K")
stochD = input.int(3, title="Stochastic %D")
rsiOverbought = input.int(70, title="RSI Overbought Level")
rsiOversold = input.int(30, title="RSI Oversold Level")
// === RSI ===
rsi = ta.rsi(close, rsiLength)
// === Stochastic Oscillator ===
k = ta.stoch(close, high, low, stochK)
d = ta.sma(k, stochD)
// === Buy Signal Conditions ===
rsiBuy = rsi < rsiOversold
stochBuy = ta.crossover(k, d) and k < 20
buySignal = rsiBuy and stochBuy
// === Sell Signal Conditions ===
rsiSell = rsi > rsiOverbought
stochSell = ta.crossunder(k, d) and k > 80
sellSignal = rsiSell and stochSell
// === Plot signals ===
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.arrowup, size=size.small, text="BUY")
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.arrowdown, size=size.small, text="SELL")
// === Alerts ===
alertcondition(buySignal, title="Buy Alert", message="Buy Signal: RSI < 30 and Stochastic Bullish Crossover")
alertcondition(sellSignal, title="Sell Alert", message="Sell Signal: RSI > 70 and Stochastic Bearish Crossover")
// === Show RSI and Stochastic in separate panel ===
plot(rsi, title="RSI", color=color.blue, linewidth=1, display=display.none)
hline(rsiOverbought, "Overbought", color=color.red, linestyle=hline.style_dotted, display=display.none)
hline(rsiOversold, "Oversold", color=color.green, linestyle=hline.style_dotted, display=display.none)
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.