متن کامل آگهی:
یک اندیکاتور به نام liquidity detection در تریدینگ ویو وجود دارد ، من می خوام عین همین اندیکاتور رو واسه متا تریدر 5 داشته باشم کد ایکریپت و نحوه سیگنال دهی رو هم در ادامه قرار میدم
//@version=5
indicator("Liquidity Finder Alerts (Wrapper)", overlay=true)
// ایمپورت کتابخونه اصلی TFlab
import TFlab/LiquidityFinderLibrary/1 as Liq
// ورودیها (مثل اندیکاتور اصلی)
sPP = input.float(0.30, "Statics Sensitivity", minval=0.0, maxval=0.4, step=0.01)
dPP = input.float(1.00, "Dynamics Sensitivity", minval=0.4, maxval=1.95, step=0.01)
SPP = input.int(8, "Statics Pivot Period", minval=1)
DPP = input.int(3, "Dynamics Pivot Period", minval=1)
showHLLs = input.bool(true, "Show Statics High Lines")
showLLLs = input.bool(true, "Show Statics Low Lines")
showHLLd = input.bool(true, "Show Dynamics High Lines")
showLLd = input.bool(true, "Show Dynamics Low Lines")
// فراخوانی کتابخونه برای رسم خطوط
Liq.LLF(SPP, DPP, sPP, dPP, showHLLs, showLLLs, showHLLd, showLLd)
// ساخت سیگنالها روی چارت
ph = ta.pivothigh(high, SPP, SPP)
pl = ta.pivotlow(low, SPP, SPP)
breakHigh = not na(ph) and close > ph
breakLow = not na(pl) and close < pl
plotshape(breakHigh, title="Break High", location=location.abovebar,
color=color.red, style=shape.triangleup, size=size.small, text="Liq↑")
plotshape(breakLow, title="Break Low", location=location.belowbar,
color=color.green, style=shape.triangledown, size=size.small, text="Liq↓")
// شرایط هشدار
alertcondition(breakHigh, title="Liquidity High Taken",
message="Price broke a Liquidity High")
alertcondition(breakLow, title="Liquidity Low Taken",
message="Price broke a Liquidity Low")