//@version=5 indicator("Smart Money Sell on Rally & Key Levels [S&P 500SP_DLY:SPXzbms2520//@version=5 indicator("Smart Money Sell on Rally & Key Levels ", overlay=true) // --- 1. กำหนดค่าระดับราคา Key Levels (สามารถปรับเปลี่ยนได้ในการตั้งค่า) --- stopLossLevel = input.float(278.25, title="Stop Loss / Invalidation Level") resistanceZone = input.float(276.50, title="Key Resistance Zone") tp1 = input.float(273.00, title="Take Profit 1 (TP1)") tp2 = input.float(269.50, title="Take Profit 2 (TP2)") tp3 = input.float(266.00, title="Take Profit 3 (TP3)") // --- 2. พล็อตเส้นระดับราคาบนชาร์ต --- plot(stopLossLevel, title="Stop Loss (278.25)", color=color.red, linewidth=2, style=plot.style_line) plot(resistanceZone, title="Resistance (276.50)", color=color.orange, linewidth=2, style=plot.style_line) plot(tp1, title="TP1 (273.00)", color=color.green, linewidth=1, style=plot.style_dashed) plot(tp2, title="TP2 (269.50)", color=color.green, linewidth=1, style=plot.style_dashed) plot(tp3, title="TP3 (266.00)", color=color.green, linewidth=2, style=plot.style_dashed) // --- 3. ฟังก์ชันตรวจจับ Bull Trap / Sell on Rally (Smart Money Distribution) --- // ตรวจจับเมื่อราคาขึ้นไปชนหรือทะลุแนวต้าน แต่มีแรงขายกดดันจนเกิดไส้ยาวด้านบน (Upper Wick) upperWick = high - math.max(open, close) bodySize = math.abs(close - open) isBullTrap = (high >= resistanceZone) and (close < resistanceZone) and (upperWick > bodySize) // แสดงสัญลักษณ์เตือนบนชาร์ตเมื่อเกิด Bull Trap plotshape(isBullTrap, title="Bull Trap Signal", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.normal, text="📉 Bull Trap") // --- 4. ไฮไลต์โซนอันตรายเมื่อราคาเข้าใกล้แนวต้าน --- bgcolor(high >= resistanceZone and low