OPEN-SOURCE SCRIPT

Multi-Timeframe SMAs

I use this indicator on the 1 min to keep an eye on the larger time frames 30 min, 4 hr, and 1 day to enter exit my trades. I like to follow the trend so this give me a view on the 1 min of the location and direction of the other 9/20s.

// ---------------------------------------------------------------------------
// Description:
// This script plots 9 SMA and 20 SMA lines for up to three user-configurable
// timeframes. By default, it uses 30 minutes, 4 hours, and 1 day as the
// timeframes. Users can enable/disable any timeframe and adjust their settings
// via the indicator options.
//
// Features:
// - Configurable timeframes for 9 SMA and 20 SMA.
// - Adjustable transparency (default: 50%) for better chart visibility.
// - Thin line style (linewidth = 1).
//
// Instructions:
// 1. Add the script to your TradingView chart.
// 2. Open the indicator settings to configure timeframes or enable/disable each.
// 3. Enjoy a multi-timeframe view of SMAs on any chart.
// ---------------------------------------------------------------------------
Simple Moving Average (SMA)

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer