เครื่องมือนี้แสดงอะไร
- A volatility-adjusted reference range
- Distance from a central EMA
- When ATR is elevated versus its baseline
Maps a configurable ATR range around an EMA and highlights elevated volatility.
//@version=6
indicator("Chartara — ATR Risk Map", overlay = true)
// Educational volatility map. Bands are references, not entry or stop instructions.
int basisLength = input.int(34, "Basis EMA", minval = 2)
int atrLength = input.int(14, "ATR length", minval = 2)
float multiplier = input.float(1.5, "ATR multiplier", minval = 0.1, step = 0.1)
bool showVolatilityTint = input.bool(true, "Show high-volatility tint")
float basis = ta.ema(close, basisLength)
float atrValue = ta.atr(atrLength)
float upperBand = basis + atrValue * multiplier
float lowerBand = basis - atrValue * multiplier
float atrBaseline = ta.sma(atrValue, 50)
bool elevatedVolatility = atrValue > atrBaseline * 1.25
plot basisPlot = plot(basis, "Basis", color = #7CA8FF, linewidth = 2)
plot upperPlot = plot(upperBand, "Upper ATR band", color = color.new(#43D9B3, 15))
plot lowerPlot = plot(lowerBand, "Lower ATR band", color = color.new(#FFB84D, 15))
fill(upperPlot, lowerPlot, color = color.new(#7CA8FF, 92), title = "Risk range")
bgcolor(showVolatilityTint and elevatedVolatility ? color.new(#FFB84D, 90) : na, title = "Elevated volatility")
alertcondition(elevatedVolatility and not elevatedVolatility[1], "Volatility elevated", "ATR is elevated versus its 50-bar baseline. Recheck position size and stop distance.")
ทุกคู่มือจะพาไปยังการเปรียบเทียบที่เกี่ยวข้อง ไม่บังคับสมัคร หากมีลิงก์พาร์ทเนอร์สำหรับประเทศของคุณ เราจะติดป้ายให้เห็นชัด
เนื้อหานี้จัดทำเพื่อการศึกษาและให้ข้อมูลทั่วไปเท่านั้น ไม่ใช่คำแนะนำด้านการลงทุน การเงิน กฎหมาย หรือภาษี และไม่ใช่การเสนอขายหรือชักชวนให้ซื้อขาย Forex และ CFD มีความเสี่ยงสูงและอาจสูญเสียเงินทั้งหมด ผู้ใช้ต้องตรวจสอบกฎหมาย ใบอนุญาต เงื่อนไขผลิตภัณฑ์ และความเหมาะสมด้วยตนเองก่อนตัดสินใจ ข้อมูลอาจเปลี่ยนแปลงและ Chartara ไม่รับประกันความถูกต้อง ความครบถ้วน หรือผลลัพธ์ การตัดสินใจและผลกำไรหรือขาดทุนเป็นความรับผิดชอบของผู้ใช้ภายใต้ขอบเขตที่กฎหมายอนุญาต