OPEN-SOURCE SCRIPT
DZ/SZ - HFM by Mama

Right-Empty Wick Zones (MTF) draws Supply/Demand zones from the remaining wick of adjacent opposite-color candles (Classic & Non-classic rules). Zones extend right only through empty space and stop at the first touching candle. Multi-TF scan (H1/H4/1D/1W/1M) with TF-colored boxes and labels showing <TF> Demand/Supply + H/L.
Demand (red → green, adjacent):
Classic: if the red candle’s lower wick is longer than the green’s → zone = [red.low, green.low] (the “excess” red wick).
Non-classic: if the red’s lower wick is shorter or equal → zone = [green.low, red.low] (use the longer green wick).
Supply (green → red, adjacent):
Classic: if the green candle’s upper wick is longer than the red’s → zone = [red.high, green.high] (the “excess” green wick).
Non-classic: if the green’s upper wick is shorter or equal → zone = [green.high, red.high] (use the longer red wick).
After a zone is created, the box extends right and terminates at the very first bar whose price range (body or wick) overlaps the zone → ensures the plotted area is genuinely right-empty.
What you see
Zone boxes with distinct colors per timeframe (e.g., H1/H4/1D/1W/1M).
Optional labels on each box: H4 Demand / H1 Supply, plus H/L prices of the zone.
Labels can sit at the left edge or follow the right edge of the box.
Inputs
Toggles: Demand Classic / Demand Non-classic / Supply Classic / Supply Non-classic.
Timeframes to scan: H1, H4, 1D, 1W, 1M.
Min zone thickness (price): minimum height of a zone (in price units).
Initial right extension (bars): initial box length; the script auto-cuts at the first touch.
Show labels / place labels at the right edge.
How to use (suggestion)
Use higher TF (e.g., 1D) for bias and lower TFs (H1/H4) for execution zones.
Keep only the rule set (Classic/Non-classic) that matches your playbook.
Treat zones as areas of interest—wait for your own confirmations (e.g., swing rejection, wick re-entry, structure shift, volume cues) and manage risk accordingly.
Notes
Because zones are sourced from higher TFs via request.security, the drawing can update intrabar; a zone is final once the source TF bar closes.
Min zone thickness uses price units (e.g., on XAUUSD, 1.00 ≈ $1).
This tool is an analytical aid, not financial advice or an entry/exit signal.
อินดิเคเตอร์ DZ/SZ - HFM by Mama ใช้หา Demand/Supply zone จาก “ไส้ที่เหลือ” ของ คู่แท่งสีตรงข้ามที่ติดกัน แล้ววาดเป็นกล่อง ยืดไปทางขวาเฉพาะช่วงที่ว่าง และ หยุดตรงแท่งแรกที่เข้ามาแตะโซน รองรับหลาย Timeframe (H1/H4/1D/1W/1M) พร้อมสีแยก TF และป้ายกำกับ <TF> Demand/Supply + H/L ของโซน
รายละเอียดการทำงาน (ไทย)
แนวคิดหลัก
Demand: เลือกคู่ แดง→เขียว ที่ “ติดกัน”
Classic: ถ้า ไส้ล่าง ของแท่งแดงยาวกว่าแท่งเขียว → โซน = [red.low, green.low]
Non-classic: ถ้า ไส้ล่าง ของแท่งแดงสั้นกว่าหรือเท่าเขียว → โซน = [green.low, red.low]
Supply: เลือกคู่ เขียว→แดง ที่ “ติดกัน”
Classic: ถ้า ไส้บน ของแท่งเขียวยาวกว่าแท่งแดง → โซน = [red.high, green.high]
Non-classic: ถ้า ไส้บน ของแท่งเขียวสั้นกว่าหรือเท่าแดง → โซน = [green.high, red.high]
เมื่อสร้างโซนแล้ว กล่องจะ ยืดทางขวา ไปเรื่อย ๆ และ หยุดทันทีเมื่อมีแท่งแรกที่ช่วงราคา (ไส้หรือตัวแท่ง) ทับซ้อนกับโซน ⇒ ได้ “พื้นที่ขวาว่าง” ตามโจทย์
สิ่งที่แสดงบนกราฟ
กล่องโซนสีตาม Timeframe (เช่น H1=ฟ้า, H4=เขียว, 1D=ส้ม, 1W=ม่วง, 1M=เทา)
Label ที่มุมกล่อง: H4 Demand / H1 Supply + ราคาของ High/Low ของโซน
(เลือกวาง ซ้าย หรือ ขอบขวา ของกล่องได้ในตั้งค่า)
ตัวเลือกสำคัญใน Settings
เปิด/ปิด: Demand Classic / Demand Non-classic / Supply Classic / Supply Non-classic
เลือก TF ที่จะสแกน: H1, H4, 1D, 1W, 1M
Min zone thickness (price): กำหนด “ความหนา” ขั้นต่ำของโซน (หน่วยเป็นราคา เช่น XAUUSD = ดอลลาร์)
Initial right extension (bars): ความยาวยืดเริ่มต้น (อินดี้จะตัดให้สั้นลงเองเมื่อมีแท่งมาแตะ)
แสดง Label บนโซน และ วาง Label ที่ขอบขวากล่อง
วิธีใช้แนะนำ
เลือก TF ที่ต้องการ (เช่น ให้ H1/H4 เป็นโซนเทรดละเอียด และ 1D ใช้กรองทิศ)
เปิดเฉพาะโหมด (Classic/Non-classic) ที่ตรงกับแนวคิดการเทรดของคุณ
ใช้โซนเป็นบริเวณ “สนใจ” แล้วรอพฤติกรรมราคา/สัญญาณยืนยันเสริม (เช่น สวิงกลับ, rejection wick, โวลลุ่ม, หรือโครงสร้างจบคลื่น)
หมายเหตุสำคัญ
อินดี้ใช้ข้อมูลข้าม TF; สัญญาณจาก TF สูง อาจเปลี่ยนระหว่างแท่งยังไม่ปิด (ลักษณะ intrabar update) โซนจะ “นิ่ง” เมื่อแท่งของ TF ต้นทาง ปิดแล้ว
หน่วยของ Min zone thickness เป็น หน่วยราคา ไม่ใช่ pips (XAUUSD: 1.00 = $1)
อินดี้ไม่ได้ให้สัญญาณเข้า–ออกอัตโนมัติ ควรใช้ร่วมกับแผนเทรดและการจัดการความเสี่ยง
Demand (red → green, adjacent):
Classic: if the red candle’s lower wick is longer than the green’s → zone = [red.low, green.low] (the “excess” red wick).
Non-classic: if the red’s lower wick is shorter or equal → zone = [green.low, red.low] (use the longer green wick).
Supply (green → red, adjacent):
Classic: if the green candle’s upper wick is longer than the red’s → zone = [red.high, green.high] (the “excess” green wick).
Non-classic: if the green’s upper wick is shorter or equal → zone = [green.high, red.high] (use the longer red wick).
After a zone is created, the box extends right and terminates at the very first bar whose price range (body or wick) overlaps the zone → ensures the plotted area is genuinely right-empty.
What you see
Zone boxes with distinct colors per timeframe (e.g., H1/H4/1D/1W/1M).
Optional labels on each box: H4 Demand / H1 Supply, plus H/L prices of the zone.
Labels can sit at the left edge or follow the right edge of the box.
Inputs
Toggles: Demand Classic / Demand Non-classic / Supply Classic / Supply Non-classic.
Timeframes to scan: H1, H4, 1D, 1W, 1M.
Min zone thickness (price): minimum height of a zone (in price units).
Initial right extension (bars): initial box length; the script auto-cuts at the first touch.
Show labels / place labels at the right edge.
How to use (suggestion)
Use higher TF (e.g., 1D) for bias and lower TFs (H1/H4) for execution zones.
Keep only the rule set (Classic/Non-classic) that matches your playbook.
Treat zones as areas of interest—wait for your own confirmations (e.g., swing rejection, wick re-entry, structure shift, volume cues) and manage risk accordingly.
Notes
Because zones are sourced from higher TFs via request.security, the drawing can update intrabar; a zone is final once the source TF bar closes.
Min zone thickness uses price units (e.g., on XAUUSD, 1.00 ≈ $1).
This tool is an analytical aid, not financial advice or an entry/exit signal.
อินดิเคเตอร์ DZ/SZ - HFM by Mama ใช้หา Demand/Supply zone จาก “ไส้ที่เหลือ” ของ คู่แท่งสีตรงข้ามที่ติดกัน แล้ววาดเป็นกล่อง ยืดไปทางขวาเฉพาะช่วงที่ว่าง และ หยุดตรงแท่งแรกที่เข้ามาแตะโซน รองรับหลาย Timeframe (H1/H4/1D/1W/1M) พร้อมสีแยก TF และป้ายกำกับ <TF> Demand/Supply + H/L ของโซน
รายละเอียดการทำงาน (ไทย)
แนวคิดหลัก
Demand: เลือกคู่ แดง→เขียว ที่ “ติดกัน”
Classic: ถ้า ไส้ล่าง ของแท่งแดงยาวกว่าแท่งเขียว → โซน = [red.low, green.low]
Non-classic: ถ้า ไส้ล่าง ของแท่งแดงสั้นกว่าหรือเท่าเขียว → โซน = [green.low, red.low]
Supply: เลือกคู่ เขียว→แดง ที่ “ติดกัน”
Classic: ถ้า ไส้บน ของแท่งเขียวยาวกว่าแท่งแดง → โซน = [red.high, green.high]
Non-classic: ถ้า ไส้บน ของแท่งเขียวสั้นกว่าหรือเท่าแดง → โซน = [green.high, red.high]
เมื่อสร้างโซนแล้ว กล่องจะ ยืดทางขวา ไปเรื่อย ๆ และ หยุดทันทีเมื่อมีแท่งแรกที่ช่วงราคา (ไส้หรือตัวแท่ง) ทับซ้อนกับโซน ⇒ ได้ “พื้นที่ขวาว่าง” ตามโจทย์
สิ่งที่แสดงบนกราฟ
กล่องโซนสีตาม Timeframe (เช่น H1=ฟ้า, H4=เขียว, 1D=ส้ม, 1W=ม่วง, 1M=เทา)
Label ที่มุมกล่อง: H4 Demand / H1 Supply + ราคาของ High/Low ของโซน
(เลือกวาง ซ้าย หรือ ขอบขวา ของกล่องได้ในตั้งค่า)
ตัวเลือกสำคัญใน Settings
เปิด/ปิด: Demand Classic / Demand Non-classic / Supply Classic / Supply Non-classic
เลือก TF ที่จะสแกน: H1, H4, 1D, 1W, 1M
Min zone thickness (price): กำหนด “ความหนา” ขั้นต่ำของโซน (หน่วยเป็นราคา เช่น XAUUSD = ดอลลาร์)
Initial right extension (bars): ความยาวยืดเริ่มต้น (อินดี้จะตัดให้สั้นลงเองเมื่อมีแท่งมาแตะ)
แสดง Label บนโซน และ วาง Label ที่ขอบขวากล่อง
วิธีใช้แนะนำ
เลือก TF ที่ต้องการ (เช่น ให้ H1/H4 เป็นโซนเทรดละเอียด และ 1D ใช้กรองทิศ)
เปิดเฉพาะโหมด (Classic/Non-classic) ที่ตรงกับแนวคิดการเทรดของคุณ
ใช้โซนเป็นบริเวณ “สนใจ” แล้วรอพฤติกรรมราคา/สัญญาณยืนยันเสริม (เช่น สวิงกลับ, rejection wick, โวลลุ่ม, หรือโครงสร้างจบคลื่น)
หมายเหตุสำคัญ
อินดี้ใช้ข้อมูลข้าม TF; สัญญาณจาก TF สูง อาจเปลี่ยนระหว่างแท่งยังไม่ปิด (ลักษณะ intrabar update) โซนจะ “นิ่ง” เมื่อแท่งของ TF ต้นทาง ปิดแล้ว
หน่วยของ Min zone thickness เป็น หน่วยราคา ไม่ใช่ pips (XAUUSD: 1.00 = $1)
อินดี้ไม่ได้ให้สัญญาณเข้า–ออกอัตโนมัติ ควรใช้ร่วมกับแผนเทรดและการจัดการความเสี่ยง
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。