SaasnBitcoin / TetherUS PERPETUAL CONTRACTBINANCE:BTCUSDT.Psjadlymwsy//@version=6 indicator("Saturday & Sunday Box - Fixed", overlay=true, max_boxes_count=500) // ───── تنظیمات ───── boxColor = input.color(color.blue, "رنگ کادر") boxTransparency = input.int(85, "شفافیت کادر", minval=0, maxval=100) borderWidth = input.int(1, "ضخامت کادر", minval=1, maxval=4) // ───── تشخیص روز ───── isSaturday = dayofweek == dayofweek.saturday isSunday = dayofweek == dayofweek.sunday isWeekend = isSaturday or isSunday // ───── متغیرها ───── var box weekendBox = na var float weekendHigh = na var float weekendLow = na var int weekendStart = na // شروع شنبه newSaturday = isSaturday and not isSaturday if newSaturday weekendStart := time weekendHigh := high weekendLow := low weekendBox := box.new( left = time, top = high, right = time_close, bottom = low, xloc = xloc.bar_time, bgcolor = color.new(boxColor, boxTransparency), border_color = boxColor, border_width = borderWidth ) // ادامه شنبه و یکشنبه if isWeekend and not na(weekendBox) weekendHigh := math.max(weekendHigh, high) weekendLow := math.min(weekendLow, low) box.set_right(weekendBox, time_close) box.set_top(weekendBox, weekendHigh) box.set_bottom(weekendBox, weekendLow)