OPEN-SOURCE SCRIPT
Multitime ATR

Multi-Timeframe Supertrend (Multitime ATR) Indicator Description
This indicator, written in Pine Script v5, is a Multi-Timeframe (MTF) Supertrend tool. It provides a multi-faceted market analysis by simultaneously displaying the Supertrend lines from the current chart timeframe and three higher timeframes: the 1-Hour (1H), 4-Hour (4H), and 1-Day (1D).
📌 Key Features and Characteristics
Multi-Timeframe Display:
It overlays the Supertrend lines from the current timeframe, 1H, 4H, and 1D onto a single chart, totaling four timeframes.
By visualizing the higher timeframe trend lines (uptrends as support, downtrends as resistance), traders can determine where the price action on the current chart stands within the context of the larger, dominant trends.
Supertrend Logic:
The Supertrend calculation utilizes the Average True Range (ATR), based on a user-specified ATR Period and ATR Multiplier.
The Change ATR Calculation Method? input allows switching the ATR calculation between the standard ta.atr (EMA-based/smoothed) and ta.sma(ta.tr, Periods) (SMA-based) methods.
Visual Aids:
Trend Lines: Uptrend lines (support) and downtrend lines (resistance) for each timeframe are plotted with different colors and line weights (e.g., Main: Green/Red, 1H: Blue tones, 4H: Purple tones, 1D: Green/Dark Red tones).
Highlighter: A background coloring feature visually highlights the area between the price and the Supertrend lines according to the trend direction for each timeframe, making the trend immediately obvious. This can be controlled collectively by the Master Highlighter setting.
Trend Change Marks: Small circle plots (●) indicate the exact points of trend reversal for each higher timeframe, clearly signaling a shift.
Warning and Break Signals:
The indicator plots signal labels on the chart when the current price breaks (or nearly breaks) a higher timeframe trend line.
Warning (⚠️): Plotted when the price closes below an uptrend line.
Break (⚡): Plotted when the price closes above a downtrend line.
These signals are designed to reset after a certain period (coded as 3,600,000 milliseconds = 1 hour) to prevent continuous noise from repetitive breaks.
Alert Functionality:
In addition to the current timeframe's Buy/Sell signals, the indicator features robust alerts for the Warning/Break signals across the 1H, 4H, and 1D timeframes, ensuring that critical trend changes are not missed.
🛠️ Customization Options
The indicator's settings allow for detailed customization of the following parameters for each timeframe (Main, 1H, 4H, 1D) individually:
ATR Period (ATR Period)
ATR Multiplier (ATR Multiplier)
Visibility toggles for trend lines, signals, and highlighters.
Furthermore, the Master Control section enables simultaneous control over the display of the Highlighter, Signals, Up Trend Lines, and Down Trend Lines across all timeframes.
This indicator serves as a powerful tool for finding more reliable entry and exit points by integrating multi-timeframe trend analysis, which helps reduce false signals often encountered in single-timeframe trading.
Would you like me to elaborate on a specific section of the code, such as the request.security function or the signal logic?
This indicator, written in Pine Script v5, is a Multi-Timeframe (MTF) Supertrend tool. It provides a multi-faceted market analysis by simultaneously displaying the Supertrend lines from the current chart timeframe and three higher timeframes: the 1-Hour (1H), 4-Hour (4H), and 1-Day (1D).
📌 Key Features and Characteristics
Multi-Timeframe Display:
It overlays the Supertrend lines from the current timeframe, 1H, 4H, and 1D onto a single chart, totaling four timeframes.
By visualizing the higher timeframe trend lines (uptrends as support, downtrends as resistance), traders can determine where the price action on the current chart stands within the context of the larger, dominant trends.
Supertrend Logic:
The Supertrend calculation utilizes the Average True Range (ATR), based on a user-specified ATR Period and ATR Multiplier.
The Change ATR Calculation Method? input allows switching the ATR calculation between the standard ta.atr (EMA-based/smoothed) and ta.sma(ta.tr, Periods) (SMA-based) methods.
Visual Aids:
Trend Lines: Uptrend lines (support) and downtrend lines (resistance) for each timeframe are plotted with different colors and line weights (e.g., Main: Green/Red, 1H: Blue tones, 4H: Purple tones, 1D: Green/Dark Red tones).
Highlighter: A background coloring feature visually highlights the area between the price and the Supertrend lines according to the trend direction for each timeframe, making the trend immediately obvious. This can be controlled collectively by the Master Highlighter setting.
Trend Change Marks: Small circle plots (●) indicate the exact points of trend reversal for each higher timeframe, clearly signaling a shift.
Warning and Break Signals:
The indicator plots signal labels on the chart when the current price breaks (or nearly breaks) a higher timeframe trend line.
Warning (⚠️): Plotted when the price closes below an uptrend line.
Break (⚡): Plotted when the price closes above a downtrend line.
These signals are designed to reset after a certain period (coded as 3,600,000 milliseconds = 1 hour) to prevent continuous noise from repetitive breaks.
Alert Functionality:
In addition to the current timeframe's Buy/Sell signals, the indicator features robust alerts for the Warning/Break signals across the 1H, 4H, and 1D timeframes, ensuring that critical trend changes are not missed.
🛠️ Customization Options
The indicator's settings allow for detailed customization of the following parameters for each timeframe (Main, 1H, 4H, 1D) individually:
ATR Period (ATR Period)
ATR Multiplier (ATR Multiplier)
Visibility toggles for trend lines, signals, and highlighters.
Furthermore, the Master Control section enables simultaneous control over the display of the Highlighter, Signals, Up Trend Lines, and Down Trend Lines across all timeframes.
This indicator serves as a powerful tool for finding more reliable entry and exit points by integrating multi-timeframe trend analysis, which helps reduce false signals often encountered in single-timeframe trading.
Would you like me to elaborate on a specific section of the code, such as the request.security function or the signal logic?
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.