Dynamic multi-timeframe Supply and Demand zones that highlight fresh vs tested levels across H1, H4, and Daily charts.
Copy and paste this code directly into your TradingView Pine Editor
//@version=5
indicator("FxSnip - Supply & Demand MTF", "FxSnip S&D Zones", overlay=true, max_boxes_count=200)
zoneLength = input.int(14, "Zone Detection Period")
supColor = input.color(color.new(color.teal, 70), "Demand Zone Color")
resColor = input.color(color.new(color.maroon, 70), "Supply Zone Color")
highPivot = ta.pivothigh(high, zoneLength, zoneLength)
lowPivot = ta.pivotlow(low, zoneLength, zoneLength)
if not na(highPivot)
box.new(left=bar_index-zoneLength, top=highPivot, right=bar_index+20, bottom=highPivot - ta.atr(14)*0.8, bgcolor=resColor, border_color=color.maroon)
if not na(lowPivot)
box.new(left=bar_index-zoneLength, top=lowPivot + ta.atr(14)*0.8, right=bar_index+20, bottom=lowPivot, bgcolor=supColor, border_color=color.teal)
.ex5 / .mq5 file.The Multi-Timeframe Supply & Demand Indicator automatically maps origin zones of major market rallies and drops. Tracks how many times a zone has been tested and alerts when fresh institutional order pools are tapped.
Need this indicator converted into an automated MT5 Expert Advisor or customized for your specific trading rules?
Order Custom Coding →Loading activity...
Just now