OPEN-SOURCE SCRIPT

Scalping Strategy

65
//version=5
strategy("Scalping Strategy", overlay=true)

// Indicators
ma50 = ta.sma(close, 50)
ema20 = ta.ema(close, 20)
ema200 = ta.ema(close, 200)
rsi = ta.rsi(close, 14)
osc = ta.stoch(close, high, low, 14)
vol = volume

// Trend Confirmation
bullishTrend = ema20 > ema200 and close > ma50
bearishTrend = ema20 < ema200 and close < ma50

// RSI Divergence Detection
rsiOverbought = rsi > 70
rsiOversold = rsi < 30

// Oscillator Confirmation
oscBull = osc < 20
oscBear = osc > 80

// Volume Confirmation
highVolume = vol > ta.sma(vol, 20)

// Entry Conditions
buySignal = bullishTrend and rsiOversold and oscBull and highVolume
sellSignal = bearishTrend and rsiOverbought and oscBear and highVolume

// Execute Trades
if buySignal
strategy.entry("Buy", strategy.long)
if sellSignal
strategy.entry("Sell", strategy.short)

// Plot indicators
plot(ma50, color=color.blue, title="MA 50")
plot(ema20, color=color.green, title="EMA 20")
plot(ema200, color=color.red, title="EMA 200")

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน