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.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน