Home Article dhan high low lavel dhan high low lavel Software Technique Web Technique All Computer Language and Computer Language Practice Computer Educa October 21, 2026 0 Comments Share: Facebook Twitter Google+ Pinterest Whatsapp TREDING //@version=6 indicator("Bjorgum Key Levels - Bright High Low V6", "Bj Key Levels V6", overlay=true, max_boxes_count=500, max_labels_count=500, max_lines_count=500) // ───────── DATE FILTER ───────── startDate = input.time(timestamp("01 Jan 2024 00:00 +0000"), "Start Date") endDate = input.time(timestamp("31 Dec 2026 23:59 +0000"), "End Date") inDate = time >= startDate and time <= endDate // ───────── ZONE INPUTS ───────── left = input.int(20, "Look Left", minval=1, group="Zones") right = input.int(15, "Look Right", minval=1, group="Zones") nPiv = input.int(4, "Number of Pivots", minval=1, maxval=100, group="Zones") atrLen = input.int(30, "ATR Length", minval=1, group="Zones") mult = input.float(0.5, "Zone Width", minval=0.0, step=0.1, group="Zones") maxZones = input.int(10, "Max Boxes", minval=1, maxval=200, group="Zones") extendBars = input.int(30, "Extend Boxes", minval=0, maxval=500, group="Zones") // ───────── DETECTION ───────── dhighs = input.bool(true, "Detect Highs", group="Detection") dlows = input.bool(true, "Detect Lows", group="Detection") // ───────── COLOR SETTINGS ───────── highBorder = input.color(#FF1744, "High Border", group="Colors") highBg = input.color(#FF1744, "High Background", group="Colors") lowBorder = input.color(#00E5FF, "Low Border", group="Colors") lowBg = input.color(#00C853, "Low Background", group="Colors") highTrans = input.int(82, "High Transparency", minval=0, maxval=100, group="Colors") lowTrans = input.int(82, "Low Transparency", minval=0, maxval=100, group="Colors") showText = input.bool(true, "Show Price In Box", group="Colors") textColor = input.color(color.white, "Box Text Color", group="Colors") // ───────── CALCULATIONS ───────── atr = ta.atr(atrLen) sync = bar_index pivot_high = ta.pivothigh(high, left, right) pivot_low = ta.pivotlow(low, left, right) band = atr[right] * mult / 2.0 HH = pivot_high + band HL = pivot_high - band LH = pivot_low + band LL = pivot_low - band // ───────── BOX STORAGE ───────── var box[] pivotHigh = array.new_box() var box[] pivotLows = array.new_box() // ───────── PIVOT HIGH ───────── if inDate and not na(pivot_high) and dhighs and barstate.isconfirmed highBox = box.new(left=sync[right], top=HH, right=sync + extendBars, bottom=HL, xloc=xloc.bar_index, border_color=highBorder, border_width=2, bgcolor=color.new(highBg, highTrans)) if showText box.set_text(highBox, "SWING HIGH\n" + str.tostring(pivot_high, format.mintick)) box.set_text_color(highBox, textColor) box.set_text_size(highBox, size.small) box.set_text_halign(highBox, text.align_center) box.set_text_valign(highBox, text.align_center) array.unshift(pivotHigh, highBox) if array.size(pivotHigh) > math.min(nPiv, maxZones) oldHigh = array.pop(pivotHigh) box.delete(oldHigh) // ───────── PIVOT LOW ───────── if inDate and not na(pivot_low) and dlows and barstate.isconfirmed lowBox = box.new(left=sync[right], top=LH, right=sync + extendBars, bottom=LL, xloc=xloc.bar_index, border_color=lowBorder, border_width=2, bgcolor=color.new(lowBg, lowTrans)) if showText box.set_text(lowBox, "SWING LOW\n" + str.tostring(pivot_low, format.mintick)) box.set_text_color(lowBox, textColor) box.set_text_size(lowBox, size.small) box.set_text_halign(lowBox, text.align_center) box.set_text_valign(lowBox, text.align_center) array.unshift(pivotLows, lowBox) if array.size(pivotLows) > math.min(nPiv, maxZones) oldLow = array.pop(pivotLows) box.delete(oldLow) // ───────── ALERTS ───────── alertcondition(inDate and not na(pivot_high) and dhighs, title="Pivot High", message="New Swing High detected") alertcondition(inDate and not na(pivot_low) and dlows, title="Pivot Low", message="New Swing Low detected") Copy Copied Text:
No comments