OPEN-SOURCE SCRIPT
Custom Sell Signal - MACD + EMA + Volume

//version=5
indicator("Custom Sell Signal - MACD + EMA + Volume", overlay=true)
// MACD Settings
fast_length = 12
slow_length = 26
signal_smoothing = 9
[macdLine, signalLine, _] = ta.macd(close, fast_length, slow_length, signal_smoothing)
// 50 EMA
ema50 = ta.ema(close, 50)
// Volume Moving Average (20 SMA)
volSMA = ta.sma(volume, 20)
// Conditions
macdCrossBelow = ta.crossunder(macdLine, signalLine)
macdAboveZero = macdLine > 0
closeNearOrBelowEMA50 = close <= ema50 * 1.005 // Adjust buffer (0.5%) if needed for "near"
volumeAboveSMA = volume > volSMA
// Final Sell Condition
sellCondition = macdCrossBelow and macdAboveZero and closeNearOrBelowEMA50 and volumeAboveSMA
// Plotting
plot(ema50, color=color.blue, title="50 EMA")
// Sell Signal Plot
plotshape(sellCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
// Alert Condition
alertcondition(sellCondition, title="Sell Signal Alert", message="Sell Signal Generated")
indicator("Custom Sell Signal - MACD + EMA + Volume", overlay=true)
// MACD Settings
fast_length = 12
slow_length = 26
signal_smoothing = 9
[macdLine, signalLine, _] = ta.macd(close, fast_length, slow_length, signal_smoothing)
// 50 EMA
ema50 = ta.ema(close, 50)
// Volume Moving Average (20 SMA)
volSMA = ta.sma(volume, 20)
// Conditions
macdCrossBelow = ta.crossunder(macdLine, signalLine)
macdAboveZero = macdLine > 0
closeNearOrBelowEMA50 = close <= ema50 * 1.005 // Adjust buffer (0.5%) if needed for "near"
volumeAboveSMA = volume > volSMA
// Final Sell Condition
sellCondition = macdCrossBelow and macdAboveZero and closeNearOrBelowEMA50 and volumeAboveSMA
// Plotting
plot(ema50, color=color.blue, title="50 EMA")
// Sell Signal Plot
plotshape(sellCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
// Alert Condition
alertcondition(sellCondition, title="Sell Signal Alert", message="Sell Signal Generated")
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.