เครื่องมือนี้แสดงอะไร
- Fast and slow trend structure
- Momentum context around RSI 50
- A calm three-state chart background
Combines two EMAs with RSI context to label constructive, defensive and neutral regimes.
//@version=6
indicator("Chartara — Trend Compass", overlay = true)
// Educational indicator. It describes market structure; it is not a buy/sell system.
int fastLength = input.int(21, "Fast EMA", minval = 2)
int slowLength = input.int(55, "Slow EMA", minval = 3)
int rsiLength = input.int(14, "RSI length", minval = 2)
bool showBackground = input.bool(true, "Show regime background")
float fastEma = ta.ema(close, fastLength)
float slowEma = ta.ema(close, slowLength)
float rsiValue = ta.rsi(close, rsiLength)
bool bullish = fastEma > slowEma and rsiValue > 50
bool bearish = fastEma < slowEma and rsiValue < 50
color regimeColor = bullish ? color.new(#43D9B3, 86) : bearish ? color.new(#FF6B7A, 88) : color.new(#F4C95D, 91)
plot(fastEma, "Fast EMA", color = #43D9B3, linewidth = 2)
plot(slowEma, "Slow EMA", color = #7CA8FF, linewidth = 2)
bgcolor(showBackground ? regimeColor : na, title = "Regime")
alertcondition(bullish and not bullish[1], "Trend Compass turned constructive", "Trend Compass is constructive. Review price structure and risk before acting.")
alertcondition(bearish and not bearish[1], "Trend Compass turned defensive", "Trend Compass is defensive. Review price structure and risk before acting.")
ทุกคู่มือจะพาไปยังการเปรียบเทียบที่เกี่ยวข้อง ไม่บังคับสมัคร หากมีลิงก์พาร์ทเนอร์สำหรับประเทศของคุณ เราจะติดป้ายให้เห็นชัด
เนื้อหานี้จัดทำเพื่อการศึกษาและให้ข้อมูลทั่วไปเท่านั้น ไม่ใช่คำแนะนำด้านการลงทุน การเงิน กฎหมาย หรือภาษี และไม่ใช่การเสนอขายหรือชักชวนให้ซื้อขาย Forex และ CFD มีความเสี่ยงสูงและอาจสูญเสียเงินทั้งหมด ผู้ใช้ต้องตรวจสอบกฎหมาย ใบอนุญาต เงื่อนไขผลิตภัณฑ์ และความเหมาะสมด้วยตนเองก่อนตัดสินใจ ข้อมูลอาจเปลี่ยนแปลงและ Chartara ไม่รับประกันความถูกต้อง ความครบถ้วน หรือผลลัพธ์ การตัดสินใจและผลกำไรหรือขาดทุนเป็นความรับผิดชอบของผู้ใช้ภายใต้ขอบเขตที่กฎหมายอนุญาต