OPEN-SOURCE SCRIPT
CAN SLIM Market Direction Monitor (India)

How to use it
Open TradingView โ load NSE:NIFTY on Daily timeframe.
Pine Editor (bottom panel) โ paste contents โ Save โ Add to chart.
Cross-check on BSE:SENSEX and your sectoral indices.
What it computes
Distribution Days โ full (โฅ0.2% down on rising vol) and stalling (0.5x weight). Auto-expires after 25 sessions or on a 5% rally from the DD's intraday low.
Follow-Through Day โ Day 4โ13 of a rally attempt with โฅ1.5% gain on rising volume.
Phase โ Green / Yellow / Red driven by DD count and price-vs-MA structure (the framework's logic, not just one trigger).
Weinstein Stage โ 1โ4 from the 30-week SMA and its slope.
Dashboard โ phase, DD count, % vs 50/200 DMA, drawdown from 60-day high, MA structure, stage, rally-day counter, and posture text.
Alerts โ DD, stalling, FTD, and zone transitions.
Caveats to keep in mind
DD logic requires volume. Some sectoral indices on TradingView lack volume โ the script flags this on-chart. Use NSE:NIFTY as the primary tape.
Breadth metrics (% of Nifty 500 above 50/200-DMA) and FII/DII flows aren't in Pine's data โ those still need to be brought in manually per the project's output protocol.
FTD detection is mechanical; always confirm the rally context (genuine correction preceding it) before treating the signal as actionable.
Open TradingView โ load NSE:NIFTY on Daily timeframe.
Pine Editor (bottom panel) โ paste contents โ Save โ Add to chart.
Cross-check on BSE:SENSEX and your sectoral indices.
What it computes
Distribution Days โ full (โฅ0.2% down on rising vol) and stalling (0.5x weight). Auto-expires after 25 sessions or on a 5% rally from the DD's intraday low.
Follow-Through Day โ Day 4โ13 of a rally attempt with โฅ1.5% gain on rising volume.
Phase โ Green / Yellow / Red driven by DD count and price-vs-MA structure (the framework's logic, not just one trigger).
Weinstein Stage โ 1โ4 from the 30-week SMA and its slope.
Dashboard โ phase, DD count, % vs 50/200 DMA, drawdown from 60-day high, MA structure, stage, rally-day counter, and posture text.
Alerts โ DD, stalling, FTD, and zone transitions.
Caveats to keep in mind
DD logic requires volume. Some sectoral indices on TradingView lack volume โ the script flags this on-chart. Use NSE:NIFTY as the primary tape.
Breadth metrics (% of Nifty 500 above 50/200-DMA) and FII/DII flows aren't in Pine's data โ those still need to be brought in manually per the project's output protocol.
FTD detection is mechanical; always confirm the rally context (genuine correction preceding it) before treating the signal as actionable.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.