Javadudushbnenejiu
euphoricPython60831

مشخصات معامله
قیمت در زمان انتشار:
۲.۴۱۷
توضیحات
//@version=5 indicator("FTG Smart Money Zones - NEAR", overlay=true) // ==== ورودیها ==== lengthBOS = input.int(5, "نگاه به عقب BOS", minval=1) lengthOB = input.int(20, "نگاه به عقب بلوک سفارش", minval=1) lengthFVG = input.int(3, "دامنه شمع FVG", minval=1) // ==== توابع ==== // شناسایی شکست ساختار (BOS) (نسخه ساده) var float lastLow = na var float lastHigh = na var bool structureBull = true // true = ساختار صعودی // بهروزرسانی آخرین های/لوها برای شناسایی ساختار if (ta.highestbars(high, lengthBOS) == 0) lastHigh := high if (ta.lowestbars(low, lengthBOS) == 0) lastLow := low // شناسایی BOS و CHoCH bosUp = low < lastLow and structureBull bosDown = high > lastHigh and not structureBull if bosUp structureBull := false if bosDown structureBull := true // ==== شناسایی بلوک سفارش (OB) ==== // OB ساده: آخرین شمع نزولی قبل از BOS صعودی یا برعکس // شمعهای نزولی و صعودی را شناسایی کنید bearCandle = close < open bullCandle = close > open // شناسایی نواحی OB var float obHigh = na var float obLow = na var bool obActive = false // وقتی که BOS تغییر میکند، ناحیه OB را علامتگذاری کنید if bosUp obHigh := high obLow := low obActive := true if bosDown obHigh := high obLow := low obActive := true // ترسیم مستطیل ناحیه OB var box obBox = na if obActive box.delete(obBox) obBox := box.new(bar_index - lengthBOS, obHigh, bar_index, obLow, border_color=color.orange, bgcolor=color.new(color.orange, 85)) // ==== شناسایی فاصله ارزش منصفانه (FVG) ==== // بررسی فاصلهها بین شمعها (فاصله ویک) // برای FVG صعودی: لو شمع فعلی > های 2 شمع پیش bullFVG = low > high // برای FVG نزولی: های شمع فعلی < لو 2 شمع پیش bearFVG = high < low // ترسیم نواحی FVG var box fvgBox = na if bullFVG box.delete(fvgBox) fvgBox := box.new(bar_index - 2, high , bar_index, low, border