PROTECTED SOURCE SCRIPT
Time-Restricted vs Normal SMA

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.
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.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.