Accumulation, manipulation, fvg, distribution

Wait 5 sec.

Accumulation, manipulation, fvg, distribution GOLD (US$/OZ)TVC:GOLDNdaya//@version=5 indicator("AMD + FVG Strategy", overlay=true, max_boxes_count=50) // ===== INPUTS ===== rangeBars = input.int(20, "Accumulation Range Length") fvgThreshold = input.float(0.0, "Minimum FVG Size") showTargets = input.bool(true, "Show Distribution Targets") // ===== ACCUMULATION ===== rangeHigh = ta.highest(high, rangeBars) rangeLow = ta.lowest(low, rangeBars) plot(rangeHigh, color=color.blue, linewidth=1, title="Accumulation High") plot(rangeLow, color=color.blue, linewidth=1, title="Accumulation Low") // ===== MANIPULATION ===== buySideSweep = high > rangeHigh and close < rangeHigh sellSideSweep = low < rangeLow and close > rangeLow plotshape(buySideSweep, title="Buy Side Sweep", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small) plotshape(sellSideSweep, title="Sell Side Sweep", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small) // ===== FAIR VALUE GAP ===== // Bullish FVG bullFVG = low > high bullGap = low - high // Bearish FVG bearFVG = high < low bearGap = low - high validBullFVG = bullFVG and bullGap > fvgThreshold validBearFVG = bearFVG and bearGap > fvgThreshold // Draw FVG zones if validBullFVG box.new( left=bar_index-2, right=bar_index+10, top=low, bottom=high, bgcolor=color.new(color.green, 85), border_color=color.green) if validBearFVG box.new( left=bar_index-2, right=bar_index+10, top=low, bottom=high, bgcolor=color.new(color.red, 85), border_color=color.red) // ===== ENTRY LOGIC ===== bullAMD = sellSideSweep and validBullFVG bearAMD = buySideSweep and validBearFVG plotshape(bullAMD, title="Bullish AMD", location=location.belowbar, color=color.lime, style=shape.labelup, text="BUY") plotshape(bearAMD, title="Bearish AMD", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL") // ===== DISTRIBUTION TARGETS ===== bullTarget = rangeHigh bearTarget = rangeLow if showTargets and bullAMD line.new( bar_index, close, bar_index + 20, bullTarget, color=color.lime, width=2) if showTargets and bearAMD line.new( bar_index, close, bar_index + 20, bearTarget, color=color.red, width=2) // ===== ALERTS ===== alertcondition(bullAMD, title="Bullish AMD Setup", message="Bullish AMD + FVG detected") alertcondition(bearAMD, title="Bearish AMD Setup"