OPEN-SOURCE SCRIPT
Color Candle Strategy

I provided. This strategy is color-based and is designed for momentum trading across any timeframe, especially the 1-minute, 5-minute, and 15-minute charts.
🧠 Strategy Overview: “Color Candle Strategy”
This is a visual, momentum-based price action system that uses color-coded candles to identify short-term directional trades. The core logic relies on specific color transitions, primarily:
Yellow candles act as signal candles
Green or Red candles act as entry confirmations
Blue candles serve as early exit warnings
📈 Core Strategy Rules
✅ BUY ENTRY
Enter a long (BUY) position when:
A Green candle closes immediately after a Yellow candle
This implies bullish continuation after a neutral/consolidation candle
📌 SELL ENTRY
Enter a short (SELL) position when:
A Red candle closes immediately after a Yellow candle
This implies bearish continuation after a pause
🎯 TARGET / EXIT
Exit the trade (full close) when:
A Yellow candle or an opposite-colored candle appears and closes
For BUY: exit on Yellow or Red close
For SELL: exit on Yellow or Green close
🏃♂️ EARLY EXIT (Optional)
If enabled via input checkbox:
Exit early if a Blue candle closes
Used to protect gains or avoid reversals
🛡️ STOP LOSS
Stop-loss is placed based on the recent candle structure:
For BUY: SL is below the lower of Yellow or Green candle
For SELL: SL is above the higher of Yellow or Red candle
🧩 Indicator Logic (in the Script)
The script simulates colored candles using placeholder logic:
Candle Simulated Condition Purpose
Yellow Close > Open and previous close < open Signal candle (pause or setup)
Green Close > Open and close > previous high Bullish entry confirmation
Red Close < Open and close < previous low Bearish entry confirmation
Blue Close < Open and volume spike Early exit or reversal warning
You can replace these conditions with actual values from a custom indicator if you're using a proprietary candle coloring system.
🧠 Strategy Overview: “Color Candle Strategy”
This is a visual, momentum-based price action system that uses color-coded candles to identify short-term directional trades. The core logic relies on specific color transitions, primarily:
Yellow candles act as signal candles
Green or Red candles act as entry confirmations
Blue candles serve as early exit warnings
📈 Core Strategy Rules
✅ BUY ENTRY
Enter a long (BUY) position when:
A Green candle closes immediately after a Yellow candle
This implies bullish continuation after a neutral/consolidation candle
📌 SELL ENTRY
Enter a short (SELL) position when:
A Red candle closes immediately after a Yellow candle
This implies bearish continuation after a pause
🎯 TARGET / EXIT
Exit the trade (full close) when:
A Yellow candle or an opposite-colored candle appears and closes
For BUY: exit on Yellow or Red close
For SELL: exit on Yellow or Green close
🏃♂️ EARLY EXIT (Optional)
If enabled via input checkbox:
Exit early if a Blue candle closes
Used to protect gains or avoid reversals
🛡️ STOP LOSS
Stop-loss is placed based on the recent candle structure:
For BUY: SL is below the lower of Yellow or Green candle
For SELL: SL is above the higher of Yellow or Red candle
🧩 Indicator Logic (in the Script)
The script simulates colored candles using placeholder logic:
Candle Simulated Condition Purpose
Yellow Close > Open and previous close < open Signal candle (pause or setup)
Green Close > Open and close > previous high Bullish entry confirmation
Red Close < Open and close < previous low Bearish entry confirmation
Blue Close < Open and volume spike Early exit or reversal warning
You can replace these conditions with actual values from a custom indicator if you're using a proprietary candle coloring system.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.