Indicator · Pine Script v6 · On the chart

Demand & Supply Zones Pro

by vedkanani123

A price-chart indicator that finds supply and demand zones from leg-in, base and leg-out candle structures.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code659
Settings40inputs
LicenceNone stated
Last update2 months ago23 Aug 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Demand comes from rally-base-rally and drop-base-rally patterns, and supply from rally-base-drop and drop-base-drop, each switchable. Leg and base candle size rules use ATR and body ratio. Zones are graded by volume against an average and can be shaded by strength. Optional trade boxes project entry, stop and a target in R, and past trades can stay on the chart. Labels are in Thai.

Details

Published by

vedkanani123 on GitHub

Draws

On the price chart

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
ATR Lengthint14atrLen
Leg: body/range ขั้นต่ำfloat0.55legBodyPct
Leg: range ≥ ATR xfloat1.0legAtrMult
Base: body/range สูงสุดfloat0.45baseBodyPct
Base: range ≤ ATR xfloat0.8baseAtrMult
Base: จำนวนแท่งสูงสุดint4maxBase
Leg-out ต้องทะลุขอบ BasebooltrueneedBreak
RBR — Rally Base Rally (Demand)booltrueuseRBR
DBR — Drop Base Rally (Demand)booltrueuseDBR
RBD — Rally Base Drop (Supply)boolfalseuseRBD
DBD — Drop Base Drop (Supply)boolfalseuseDBD
Volume: ค่าเฉลี่ยอ้างอิง (แท่ง)int50volAvgLen
Show all 40 settings
SettingTypeDefaultVariable
นับ Volume จากstringBase + Leg-outvolScope
เกรด A: volume ≥ x เท่าของค่าเฉลี่ยfloat2.0gradeAmin
เกรด B: volume ≥ x เท่าของค่าเฉลี่ยfloat1.2gradeBmin
กรองทิ้งถ้า volume < x เท่า (0 = ปิด)float0.0minVolRat
เทรดเฉพาะโซนเกรด AboolfalseonlyGradeA
แสดงค่า volume บนป้ายโซนbooltrueshowVolTxt
โซน volume สูง = สีเข้มกว่าbooltrueshadeByVol
เปิดระบบ TP/SLbooltrueenableTrade
จุด EntrystringZone EdgeentryMode
โหมด Stop LossstringZone DistalslMode
SL buffer (x ATR)float0.2slBufAtr
SL ระยะ (x ATR) — โหมด ATRfloat1.5slAtrMult
เป้า Take Profitstring3RrrInput
ต้องออกจากโซนก่อนถึงนับ retestbooltruerequireRet
แสดง SL/TP ล่วงหน้าบนโซนที่ยังรอbooltrueshowProj
ความยาวกล่องเทรด (แท่ง)int8tradeExtend
🗂️ เก็บประวัติเทรดไว้บนชาร์ตbooltrueshowHistory
เก็บกล่อง TP/SL ของไม้เก่าไว้ด้วยbooltruehistBoxes
จำนวนไม้ย้อนหลังสูงสุดint20maxHistory
ทำให้ประวัติจางลงเพิ่ม (%)int0histFade
ขอบโซนstringWick (High/Low)zoneMode
ยืดโซนไปขวา (แท่ง)int30extendBars
เก็บโซนล่าสุดสูงสุดint20maxZones
เมื่อโซนถูกแตะแล้วstringFadeafterHit
ลบโซนที่ถูกทะลุboolfalsedelBroken
แสดงป้ายชื่อโซนbooltrueshowLabel
ขนาดป้ายstringSmalllabelSizeIn
สี Demandcolorcolor.new(color.teal, 0)demandCol
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

This overlay indicator draws a fixed-range volume profile on the price chart, splitting traded activity into up and down volume at each price level. It also plots a sentiment profile, a developing point of control, and value-area high and low around a configur

Indicator v5 VolumeSupport & resistance
Updated 2 months ago · MIT GitHub repository of Volume Profile and Indicator by DGT

MGIC-tracker

by Allen1212
303 stars

The MGIC-tracker is a TradingView indicator that overlays ARK Invest trade records onto stock price charts. It plots buy and sell labels at the exact timestamp of each transaction, showing share volume and ETF weight. Users select a specific ETF type via setti

Indicator v4 Support & resistanceVolume
Updated 2 years ago · None stated GitHub repository of MGIC-tracker
228 stars

Comprehensive Volume Profile is an overlay indicator that calculates and plots volume distribution across specified time ranges such as daily sessions, weekly, monthly, or custom bar lengths. It identifies key structural price levels including the Point of Con

Indicator v6 VolumeSupport & resistance
Updated 3 months ago · None stated GitHub repository of Comprehensive Volume Profile

Moon Dev GEX Arrows

by moondevonyt
92 stars

This overlay indicator plots option strike walls and an optional session VWAP on the price chart for SPY or ES. It spaces major strikes by the selected instrument, draws a set number of strikes on each side, and marks wall-trap and sweep events after a cooldow

Indicator v5 Support & resistanceSessions & time
Updated 2 months ago · Custom licence GitHub repository of Moon Dev GEX Arrows

More Support & resistance scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers