OPEN-SOURCE SCRIPT
CISD Trend Candle + MACD Signal

This custom TradingView indicator combines trend-based candle coloring with MACD reversal detection to generate clear entry and exit signals:
🔷 Blue triangle (Buy): Appears when the candles confirm an uptrend (e.g., 5 consecutive closes above 21 EMA) and no long position is currently held.
🔴 Red triangle (Sell): Appears when the candles confirm a downtrend (e.g., 5 consecutive closes below 21 EMA) and no short position is currently held.
⚪ Gray triangle (Exit):
If in a long position, it shows when the candle turns neutral (gray) and the MACD crosses down (bearish signal), or the trend turns red.
If in a short position, it shows when the candle turns neutral and the MACD crosses up (bullish signal), or the trend turns blue.
🟠 Orange line: 21-period EMA used for trend validation.
This logic prevents premature entries and provides structured exit points, aiming to avoid false signals in choppy markets.
🔷 Blue triangle (Buy): Appears when the candles confirm an uptrend (e.g., 5 consecutive closes above 21 EMA) and no long position is currently held.
🔴 Red triangle (Sell): Appears when the candles confirm a downtrend (e.g., 5 consecutive closes below 21 EMA) and no short position is currently held.
⚪ Gray triangle (Exit):
If in a long position, it shows when the candle turns neutral (gray) and the MACD crosses down (bearish signal), or the trend turns red.
If in a short position, it shows when the candle turns neutral and the MACD crosses up (bullish signal), or the trend turns blue.
🟠 Orange line: 21-period EMA used for trend validation.
This logic prevents premature entries and provides structured exit points, aiming to avoid false signals in choppy markets.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。