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.
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.