OPEN-SOURCE SCRIPT
Anti-PDT Swing Trade Signals

//version=5
indicator("Anti-PDT Swing Trade Signals", overlay=true)
// === User Inputs ===
priceLimit = input.float(25, "Max Price ($)", minval=1)
minVolume = input.int(200000, "Min Avg Volume (10D)", minval=1)
// === Indicators ===
sma20 = ta.sma(close, 20)
sma50 = ta.sma(close, 50)
macdLine = ta.ema(close, 12) - ta.ema(close, 26)
signalLine = ta.ema(macdLine, 9)
rsi = ta.rsi(close, 14)
avgVolume = ta.sma(volume, 10)
// === Conditions ===
priceFilter = close <= priceLimit
volumeFilter = avgVolume >= minVolume
rsiFilter = ta.crossover(rsi, 40)
macdFilter = ta.crossover(macdLine, signalLine)
smaFilter = close > sma20 and close > sma50
momentumFilter = close > close[5] * 1.03 and close < close[5] * 1.10
// === Day Filter ===
isMonWedFri = dayofweek == dayofweek.monday or dayofweek == dayofweek.wednesday or dayofweek == dayofweek.friday
entryCondition = priceFilter and volumeFilter and rsiFilter and macdFilter and smaFilter and momentumFilter and isMonWedFri
// === Alerts & Visuals ===
plotshape(entryCondition, title="BUY", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
alertcondition(entryCondition, title="BUY Alert", message="BUY Signal: {{ticker}} meets swing trading entry criteria.")
plot(sma20, color=color.orange)
plot(sma50, color=color.blue)
indicator("Anti-PDT Swing Trade Signals", overlay=true)
// === User Inputs ===
priceLimit = input.float(25, "Max Price ($)", minval=1)
minVolume = input.int(200000, "Min Avg Volume (10D)", minval=1)
// === Indicators ===
sma20 = ta.sma(close, 20)
sma50 = ta.sma(close, 50)
macdLine = ta.ema(close, 12) - ta.ema(close, 26)
signalLine = ta.ema(macdLine, 9)
rsi = ta.rsi(close, 14)
avgVolume = ta.sma(volume, 10)
// === Conditions ===
priceFilter = close <= priceLimit
volumeFilter = avgVolume >= minVolume
rsiFilter = ta.crossover(rsi, 40)
macdFilter = ta.crossover(macdLine, signalLine)
smaFilter = close > sma20 and close > sma50
momentumFilter = close > close[5] * 1.03 and close < close[5] * 1.10
// === Day Filter ===
isMonWedFri = dayofweek == dayofweek.monday or dayofweek == dayofweek.wednesday or dayofweek == dayofweek.friday
entryCondition = priceFilter and volumeFilter and rsiFilter and macdFilter and smaFilter and momentumFilter and isMonWedFri
// === Alerts & Visuals ===
plotshape(entryCondition, title="BUY", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
alertcondition(entryCondition, title="BUY Alert", message="BUY Signal: {{ticker}} meets swing trading entry criteria.")
plot(sma20, color=color.orange)
plot(sma50, color=color.blue)
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.