OPEN-SOURCE SCRIPT
Traffic Light Strategy -Power of stocks

To publish the Traffic Light Strategy (based on the setup by Subasish Pani - Power of Stocks) on TradingView, your description must be clear, honest, and credit the original creator to comply with the "House Rules" regarding attribution and original content.
Here is a professional, compliant description you can use:
Traffic Light Strategy: Red-Green Candle Breakout (Power of Stocks)
Overview
This strategy is an automated version of the popular "Traffic Light" setup shared by Subasish Pani (Power of Stocks). It is designed specifically for intraday traders looking for momentum breakouts based on back-to-back contrasting candle colors (Red & Green).
Core Logic
The strategy searches for the first occurrence of a "contrasting pair" after the market settles:
The Setup: A Green candle followed by a Red candle, or a Red candle followed by a Green candle.
The Range: Once this pair is formed, the script identifies the Highest High and Lowest Low of those two specific candles.
The Trigger: A trade is entered when the price closes above the high (Long) or below the low (Short) of that range.
Key Features & Enhancements
1-Minute Filter: Per the original rules, the script can automatically ignore the initial 9:15 AM candle on 1-minute timeframes to avoid opening-bell noise.
Max SL Point Filter: Includes an optional toggle to skip trades if the "Traffic Light" range is too wide (e.g., > 100 points on Nifty), ensuring you only take trades with favorable risk profiles.
Risk Management:
Configurable R:R: Defaulted to 1:2, but fully adjustable.
Trade Limit: Limits the strategy to 3 trades per day to prevent overtrading in choppy markets.
Intraday Auto-Exit: Automatically flattens all positions at 15:20 (3:20 PM IST) to ensure no overnight carryover.
How to Use
Timeframe: Works best on 1-minute, 5-minute, or 15-minute charts.
Instruments: Highly effective on high-liquidity instruments like Nifty, BankNifty, and major Blue-chip stocks.
Settings: Ensure your chart timezone is set to UTC+5:30 (IST) for the time-based exit to function correctly.
House Rules & Attribution
This script is provided for educational and backtesting purposes. The original "Traffic Light" concept was developed by Subasish Pani of Power of Stocks. I have simply converted the manual logic into a Pine Script strategy for the community to verify performance.
Here is a professional, compliant description you can use:
Traffic Light Strategy: Red-Green Candle Breakout (Power of Stocks)
Overview
This strategy is an automated version of the popular "Traffic Light" setup shared by Subasish Pani (Power of Stocks). It is designed specifically for intraday traders looking for momentum breakouts based on back-to-back contrasting candle colors (Red & Green).
Core Logic
The strategy searches for the first occurrence of a "contrasting pair" after the market settles:
The Setup: A Green candle followed by a Red candle, or a Red candle followed by a Green candle.
The Range: Once this pair is formed, the script identifies the Highest High and Lowest Low of those two specific candles.
The Trigger: A trade is entered when the price closes above the high (Long) or below the low (Short) of that range.
Key Features & Enhancements
1-Minute Filter: Per the original rules, the script can automatically ignore the initial 9:15 AM candle on 1-minute timeframes to avoid opening-bell noise.
Max SL Point Filter: Includes an optional toggle to skip trades if the "Traffic Light" range is too wide (e.g., > 100 points on Nifty), ensuring you only take trades with favorable risk profiles.
Risk Management:
Configurable R:R: Defaulted to 1:2, but fully adjustable.
Trade Limit: Limits the strategy to 3 trades per day to prevent overtrading in choppy markets.
Intraday Auto-Exit: Automatically flattens all positions at 15:20 (3:20 PM IST) to ensure no overnight carryover.
How to Use
Timeframe: Works best on 1-minute, 5-minute, or 15-minute charts.
Instruments: Highly effective on high-liquidity instruments like Nifty, BankNifty, and major Blue-chip stocks.
Settings: Ensure your chart timezone is set to UTC+5:30 (IST) for the time-based exit to function correctly.
House Rules & Attribution
This script is provided for educational and backtesting purposes. The original "Traffic Light" concept was developed by Subasish Pani of Power of Stocks. I have simply converted the manual logic into a Pine Script strategy for the community to verify performance.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.