PROTECTED SOURCE SCRIPT
Custom UT Bot Alerts (EMA + RSI Filter)

//version=5
indicator("Custom UT Bot Alerts (EMA + RSI Filter)", overlay=true)
// ================= INPUTS =================
keyValue = input.float(1.5, "Key Value (Sensitivity)")
atrPeriod = input.int(15, "ATR Period")
// ================= SOURCE DATA (12h = 720 menit) =================
srcClose = request.security(syminfo.tickerid, "720", close)
atrValue = request.security(syminfo.tickerid, "720", ta.atr(atrPeriod))
// ================= CALCULATIONS =================
longStop = srcClose - keyValue * atrValue
shortStop = srcClose + keyValue * atrValue
var float stop = srcClose
var int dir = 1
if (srcClose > stop)
dir := 1
stop := math.max(longStop, stop)
else
dir := -1
stop := math.min(shortStop, stop)
// ================= SIGNALS =================
longSignal = ta.crossover(srcClose, stop)
shortSignal = ta.crossunder(srcClose, stop)
// ================= PLOT & ALERTS =================
plot(stop, "Stop Line", color = dir == 1 ? color.green : color.red, linewidth=2)
plotshape(longSignal, title="Buy Signal", location=location.belowbar,
color=color.green, style=shape.triangleup, size=size.large, text="BUY")
plotshape(shortSignal, title="Sell Signal", location=location.abovebar,
color=color.red, style=shape.triangledown, size=size.large, text="SELL")
alertcondition(longSignal, title="Buy Alert", message="Buy Signal Triggered")
alertcondition(shortSignal, title="Sell Alert", message="Sell Signal Triggered")
indicator("Custom UT Bot Alerts (EMA + RSI Filter)", overlay=true)
// ================= INPUTS =================
keyValue = input.float(1.5, "Key Value (Sensitivity)")
atrPeriod = input.int(15, "ATR Period")
// ================= SOURCE DATA (12h = 720 menit) =================
srcClose = request.security(syminfo.tickerid, "720", close)
atrValue = request.security(syminfo.tickerid, "720", ta.atr(atrPeriod))
// ================= CALCULATIONS =================
longStop = srcClose - keyValue * atrValue
shortStop = srcClose + keyValue * atrValue
var float stop = srcClose
var int dir = 1
if (srcClose > stop)
dir := 1
stop := math.max(longStop, stop)
else
dir := -1
stop := math.min(shortStop, stop)
// ================= SIGNALS =================
longSignal = ta.crossover(srcClose, stop)
shortSignal = ta.crossunder(srcClose, stop)
// ================= PLOT & ALERTS =================
plot(stop, "Stop Line", color = dir == 1 ? color.green : color.red, linewidth=2)
plotshape(longSignal, title="Buy Signal", location=location.belowbar,
color=color.green, style=shape.triangleup, size=size.large, text="BUY")
plotshape(shortSignal, title="Sell Signal", location=location.abovebar,
color=color.red, style=shape.triangledown, size=size.large, text="SELL")
alertcondition(longSignal, title="Buy Alert", message="Buy Signal Triggered")
alertcondition(shortSignal, title="Sell Alert", message="Sell Signal Triggered")
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน