PROTECTED SOURCE SCRIPT

Time-Restricted vs Normal SMA

24
This script plots two Simple Moving Averages (SMAs):

Restricted SMA (Orange): A moving average that only uses data within a defined intraday session (default: 09:15 – 16:30). It ignores all price data outside this session and does not draw a line during off-hours.

Normal SMA (Blue): A standard rolling SMA that runs continuously using all bars, without time restrictions.

The restricted SMA is useful for traders who only want to analyze moving averages during active market hours, such as stock exchange sessions or custom trading windows. By filtering out after-hours and pre-market activity, this indicator helps align signals more closely with official trading sessions.

Customization:
Adjust the lengths of both SMAs.
Modify the session hours to match your market or strategy.
This tool is designed for intraday traders who want greater control over how moving averages respond to session-specific data.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน