OPEN-SOURCE SCRIPT
CISD Trend Candle - EMA + Always MACD

This indicator combines trend detection using EMA with constant MACD cross signals to provide a clear visual understanding of market direction and potential entry/exit points.
■ 1. Trend Detection with EMA (Candle Coloring)
Calculates an EMA (default: 21).
Checks whether the last n candles (default: 5):
Close above the EMA → Uptrend (Blue candles)
Close below the EMA → Downtrend (Red candles)
Otherwise → Neutral (Gray candles)
Candle colors automatically change to show the current market trend at a glance.
■ 2. Always-Visible MACD Golden/Dead Cross Signals
Based on MACD settings (12, 26, 9)
Golden Cross → Blue upward triangle below the bar
Dead Cross → Red downward triangle above the bar
Signals are always displayed, regardless of trend state, making them useful for timing entries and exits.
■ 3. EMA Line Display
The EMA used for trend detection is plotted as an orange line.
🎯 Ideal Use Cases
This indicator is designed for traders who want to:
Quickly visualize trend direction through candle colors
Always monitor MACD cross signals
Improve decision-making with simple, intuitive visual cues
■ 1. Trend Detection with EMA (Candle Coloring)
Calculates an EMA (default: 21).
Checks whether the last n candles (default: 5):
Close above the EMA → Uptrend (Blue candles)
Close below the EMA → Downtrend (Red candles)
Otherwise → Neutral (Gray candles)
Candle colors automatically change to show the current market trend at a glance.
■ 2. Always-Visible MACD Golden/Dead Cross Signals
Based on MACD settings (12, 26, 9)
Golden Cross → Blue upward triangle below the bar
Dead Cross → Red downward triangle above the bar
Signals are always displayed, regardless of trend state, making them useful for timing entries and exits.
■ 3. EMA Line Display
The EMA used for trend detection is plotted as an orange line.
🎯 Ideal Use Cases
This indicator is designed for traders who want to:
Quickly visualize trend direction through candle colors
Always monitor MACD cross signals
Improve decision-making with simple, intuitive visual cues
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน