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.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。