Stock Highs Tracker with Indices

1. Retrieves and Displays Key Price Metrics
All-Time High (ATH): The highest price the stock has ever reached.
52-Week High: The highest price in the last 252 trading days.
Current Price: The stock’s closing price.
2. Calculates Percentage Differences
% from ATH: How much the stock is below its all-time high.
% from 52WKH: How much the stock is below its 52-week high.
3. Fetches and Compares with Indices
It retrieves similar metrics (ATH, 52-Week High, Current Price, % from ATH, % from 52WKH) for:
Nifty 50
Nifty 500
CNX-SmallCap
CNX-MidCap
This helps in assessing whether the stock's movement aligns with broader market trends.
4. Displays Data in a Table
The script creates a table positioned at the top-right corner.
It color-codes different rows for easy readability.
The table compares the stock’s performance against the major indices.
Use Case
Helps traders and investors track stock highs relative to market indices.
Identifies whether the stock is outperforming or underperforming the broader market.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.
Penafian
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.