OPEN-SOURCE SCRIPT
HV-SMA Delta

Historical Volatility with SMA Multiplier
Concept
This indicator acts as a "volatility explosion meter" for the market. Its core principle is to compare the current volatility with its historical average to detect moments when the market begins to "swing" with significantly more force.
The main components are as follows:
① Historical Volatility (HV) This line is an indicator of the current price volatility.
If this line moves higher, it means the price is swinging wildly (high volatility).
If this line is low, it means the price is calm or moving within a narrow range (low volatility).
② SMA x Multiplier This line functions as a "threshold" or "volatility resistance" level. It is calculated from the moving average of past volatility and then multiplied by an adjustable number (smaMultiplier) to create an upper band. In simple terms, this line tells us: "Normally, volatility should not exceed this level."
③ Difference (Histogram) This is the result of subtracting the Threshold Line (②) from the HV value (①).
[ Positive Bars ] Appear when the HV breaks above the threshold line. This signals that "volatility has now spiked significantly above its historical average."
[ Negative Bars ] Appear when the HV is still below the threshold line. This indicates that volatility remains at a normal or below-average level.
.
.
How to Use
This indicator does not tell you the direction of the price. Instead, it indicates the "power" or "momentum" of the movement. Therefore, it should always be used in conjunction with other tools to confirm the direction.
① Look for "Volatility Breakout" signals.
② Use it to confirm the strength of a trend.
③ Use it for risk management.
You can try adjusting the smaLength and smaMultiplier values in the indicator's settings to fit the specific asset and timeframe you are trading. More volatile assets may require a higher Multiplier.
-----------------------------------------------------------
หลักการทำงาน (Concept)
Indicator ตัวนี้เป็น "เครื่องวัดการระเบิดของความผันผวน" ในตลาด
โดยแกนหลักเป็นการเปรียบเทียบความผันผวนในปัจจุบันกับความผันผวนโดยเฉลี่ยในอดีต
เพื่อหาจังหวะที่ตลาดเริ่ม "เหวี่ยง" แรงขึ้นอย่างมีนัยสำคัญ
ส่วนประกอบหลักๆ มีดังนี้:
① Historical Volatility (HV)
เส้นนี้คือตัวชี้วัดความผันผวนของราคา ณ ปัจจุบัน
ถ้าเส้นนี้วิ่งขึ้นสูง แปลว่าราคากำลังแกว่งตัวรุนแรง (ผันผวนสูง)
ถ้าเส้นนี้อยู่ต่ำ แปลว่าราคานิ่งๆ หรือเคลื่อนไหวในกรอบแคบๆ (ผันผวนต่ำ)
② SMA x Multiplier
เส้นนี้ทำหน้าที่เป็น "เส้นเกณฑ์" หรือ "แนวต้านของความผันผวน"
ถูกคำนวณมาจากเส้นค่าเฉลี่ยของความผันผวนในอดีต
แล้วคูณด้วยตัวเลข Adjustable (sma-Multiplier) เพื่อสร้างเป็นกรอบบน
พูดง่ายๆ คือ เส้นนี้บอกเราว่า "โดยปกติแล้ว ความผันผวนไม่ควรจะเกินระดับนี้"
③ Difference (Histogram)
เป็นผลลัพธ์จากการนำค่า HV ข้อ ① มาลบกับ เส้นเกณฑ์ ข้อ ②
[ แท่งแกนบวก ] เกิดขึ้นเมื่อ HV ทะลุเส้นเกณฑ์ขึ้นไป
เป็นสัญญาณว่า ณ ตอนนี้ "ความผันผวนได้พุ่งสูงกว่าค่าเฉลี่ยในอดีตอย่างมีนัยสำคัญ"
[ แท่งแกนลบ ] เกิดขึ้นเมื่อ HV ยังอยู่ต่ำกว่าเส้นเกณฑ์
บอกว่าความผันผวนยังอยู่ในระดับปกติหรือต่ำกว่าค่าเฉลี่ย
.
.
วิธีการนำไปใช้ (How to Use)
Indicator ตัวนี้ ไม่ได้บอกทิศทางของราคา
แต่จะบอก "พลัง" หรือ "โมเมนตัม" ของการเคลื่อนไหว
เราจึงควรใช้มันร่วมกับเครื่องมืออื่นเพื่อยืนยันทิศทางเสมอ
① มองหาสัญญาณ "การระเบิดของราคา" (Volatility Breakout)
② ใช้ยืนยันความแข็งแกร่งของเทรนด์
③ ใช้ในการบริหารความเสี่ยง
สามารถลองปรับค่า smaLength และ smaMultiplier ในการตั้งค่า Indicator
เพื่อให้เข้ากับสินทรัพย์และ Timeframe ที่เทรดได้นะ
สินทรัพย์ที่เหวี่ยงแรงๆ อาจต้องใช้ Multiplier ที่สูงขึ้น เป็นต้น
Concept
This indicator acts as a "volatility explosion meter" for the market. Its core principle is to compare the current volatility with its historical average to detect moments when the market begins to "swing" with significantly more force.
The main components are as follows:
① Historical Volatility (HV) This line is an indicator of the current price volatility.
If this line moves higher, it means the price is swinging wildly (high volatility).
If this line is low, it means the price is calm or moving within a narrow range (low volatility).
② SMA x Multiplier This line functions as a "threshold" or "volatility resistance" level. It is calculated from the moving average of past volatility and then multiplied by an adjustable number (smaMultiplier) to create an upper band. In simple terms, this line tells us: "Normally, volatility should not exceed this level."
③ Difference (Histogram) This is the result of subtracting the Threshold Line (②) from the HV value (①).
[ Positive Bars ] Appear when the HV breaks above the threshold line. This signals that "volatility has now spiked significantly above its historical average."
[ Negative Bars ] Appear when the HV is still below the threshold line. This indicates that volatility remains at a normal or below-average level.
.
.
How to Use
This indicator does not tell you the direction of the price. Instead, it indicates the "power" or "momentum" of the movement. Therefore, it should always be used in conjunction with other tools to confirm the direction.
① Look for "Volatility Breakout" signals.
② Use it to confirm the strength of a trend.
③ Use it for risk management.
You can try adjusting the smaLength and smaMultiplier values in the indicator's settings to fit the specific asset and timeframe you are trading. More volatile assets may require a higher Multiplier.
-----------------------------------------------------------
หลักการทำงาน (Concept)
Indicator ตัวนี้เป็น "เครื่องวัดการระเบิดของความผันผวน" ในตลาด
โดยแกนหลักเป็นการเปรียบเทียบความผันผวนในปัจจุบันกับความผันผวนโดยเฉลี่ยในอดีต
เพื่อหาจังหวะที่ตลาดเริ่ม "เหวี่ยง" แรงขึ้นอย่างมีนัยสำคัญ
ส่วนประกอบหลักๆ มีดังนี้:
① Historical Volatility (HV)
เส้นนี้คือตัวชี้วัดความผันผวนของราคา ณ ปัจจุบัน
ถ้าเส้นนี้วิ่งขึ้นสูง แปลว่าราคากำลังแกว่งตัวรุนแรง (ผันผวนสูง)
ถ้าเส้นนี้อยู่ต่ำ แปลว่าราคานิ่งๆ หรือเคลื่อนไหวในกรอบแคบๆ (ผันผวนต่ำ)
② SMA x Multiplier
เส้นนี้ทำหน้าที่เป็น "เส้นเกณฑ์" หรือ "แนวต้านของความผันผวน"
ถูกคำนวณมาจากเส้นค่าเฉลี่ยของความผันผวนในอดีต
แล้วคูณด้วยตัวเลข Adjustable (sma-Multiplier) เพื่อสร้างเป็นกรอบบน
พูดง่ายๆ คือ เส้นนี้บอกเราว่า "โดยปกติแล้ว ความผันผวนไม่ควรจะเกินระดับนี้"
③ Difference (Histogram)
เป็นผลลัพธ์จากการนำค่า HV ข้อ ① มาลบกับ เส้นเกณฑ์ ข้อ ②
[ แท่งแกนบวก ] เกิดขึ้นเมื่อ HV ทะลุเส้นเกณฑ์ขึ้นไป
เป็นสัญญาณว่า ณ ตอนนี้ "ความผันผวนได้พุ่งสูงกว่าค่าเฉลี่ยในอดีตอย่างมีนัยสำคัญ"
[ แท่งแกนลบ ] เกิดขึ้นเมื่อ HV ยังอยู่ต่ำกว่าเส้นเกณฑ์
บอกว่าความผันผวนยังอยู่ในระดับปกติหรือต่ำกว่าค่าเฉลี่ย
.
.
วิธีการนำไปใช้ (How to Use)
Indicator ตัวนี้ ไม่ได้บอกทิศทางของราคา
แต่จะบอก "พลัง" หรือ "โมเมนตัม" ของการเคลื่อนไหว
เราจึงควรใช้มันร่วมกับเครื่องมืออื่นเพื่อยืนยันทิศทางเสมอ
① มองหาสัญญาณ "การระเบิดของราคา" (Volatility Breakout)
② ใช้ยืนยันความแข็งแกร่งของเทรนด์
③ ใช้ในการบริหารความเสี่ยง
สามารถลองปรับค่า smaLength และ smaMultiplier ในการตั้งค่า Indicator
เพื่อให้เข้ากับสินทรัพย์และ Timeframe ที่เทรดได้นะ
สินทรัพย์ที่เหวี่ยงแรงๆ อาจต้องใช้ Multiplier ที่สูงขึ้น เป็นต้น
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.