OPEN-SOURCE SCRIPT
업데이트됨 Previous Day's Close Indicator (Regular Hours)

This indicator was developed to replace TradingView's built-in previous close indicator—which erroneously uses the close from two trading days prior. By capturing the actual last trade during the standard session, this script provides a reliable and precise previous close level.
Key features include:
Accurate Previous Close: This indicator locks in the last trade of the regular session, ensuring you always see the true previous day close.
Customizable Display Options: Users can choose between a line or circle plot, with adjustable size settings to suit their charting preferences.
Enjoy!
Key features include:
Accurate Previous Close: This indicator locks in the last trade of the regular session, ensuring you always see the true previous day close.
Customizable Display Options: Users can choose between a line or circle plot, with adjustable size settings to suit their charting preferences.
Enjoy!
릴리즈 노트
Previous Close Indicator – Updated VersionThis script plots the previous regular trading hours (RTH) close on the chart, providing traders with a key reference point for market analysis. The previous close is a widely used support/resistance level, often influencing price action in the following session.
🔹 How It Works:
Session Detection:
The script identifies whether the current time falls within regular trading hours (RTH): Monday to Friday from 09:30 to 16:00 (Eastern Time).
Tracking the Last RTH Close:
While inside RTH, the script continuously updates the last known close price.
When RTH ends, this final close price is stored as the previous close.
Plotting the Previous Close:
The script plots the stored value as a purple circle marker, ensuring clarity on the chart.
🔄 What’s New in This Update?
Optimized Logic: The script now efficiently tracks and stores the last RTH close, ensuring accuracy.
Simplified Code: The new version removes unnecessary conditions and variables, improving performance.
Trading Days Adjusted: Now correctly detects market sessions from Monday to Friday (day codes 2-6).
✅ How to Use It:
Important: Under Chart Settings, Symbol -> Session must be set to Extended Trading Hours for the indicator to work.
This indicator is ideal for traders who monitor gap behavior, overnight sentiment, or price reactions to the previous close.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.