Indicator · Pine Script v5 · Own pane

VIX 10SMA

by klevler· code credited to barton

This indicator plots candles for a selected symbol, defaulting to CBOE:VIX, in a separate pane together with a simple moving average of close and a line at 1.2 times that average.

View on GitHub

GitHub stars2on the repository
Pine versionv5runs as is
Lines of code37
Settings3inputs
LicenceMIT
Last update2 years ago27 Apr 2024

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

37 lines of Pine Script v5 from indicators/vix_10sma.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

vix_10sma.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © barton

//@version=5
indicator("VIX 10SMA")

// Getting inputs
symbol = input.symbol(title='Tiker', defval='CBOE:VIX')
vix = request.security(symbol, timeframe.period, hlc3)
sma_periode = input(10, "SMA")

col_signal = input(color.new(#ed0c0c, 70), title = "Signal")

// Candel Color
//col_body_up = input.color(color.new(#ed0c0c, 70), "Körper", group="Kerze", inline="candle")
//col_body_down = input.color(#B2DFDB, "", group="Kerze", inline="candle")
//col_wick_up = input.color(color.new(#ed0c0c, 70)), "Rahmen", group="Kerze", inline="wick")
//col_wick_down = input.color(#FF5252, "", group="Kerze", inline="wick")
//col_border_up = input.color(#FFCDD2, "Docht   ", group="Kerze", inline="border")
//col_border_down = input.color(#FF5252, "", group="Kerze", inline="border")
//----------------------------------------------------------------
//----------------------------------------------------------------
[openV, highV, lowV, closeV, maV] = request.security(symbol, timeframe.period, [open, high, low, close, ta.sma(close, sma_periode)])

aboveLine = highV > maV * 1.20 ? 1 : 0
red = color.new(color.red, 0)
color sig_color = aboveLine ? col_signal: na

bgcolor(color=sig_color, title = "Signal") 

color UP_COLOR = color.green
color DN_COLOR = color.red
color col_candle = closeV >= openV ? UP_COLOR: DN_COLOR

plotcandle(openV, highV, lowV, closeV, color=col_candle, wickcolor = col_candle , bordercolor = col_candle, title = "Kerze")
plot(maV, title = "SMA")
plot(maV * 1.2, title = "SMA")

Overview

VIX 10SMA colors the background when the symbol high is more than 20 percent above the moving average. The symbol, the moving-average length, and the signal color are user inputs. There are no trade entries, exits, or position rules.

Details

Published by

klevler on GitHub

Code credit

barton, as written in the script's header

Draws

Separate pane below the chart

Markets

Indices

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
TikersymbolCBOE:VIXsymbol
SMAint10sma_periode
Signalcolorcolor.new(#ed0c0c, 70)col_signal
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

318 stars

Calculates and plots moving averages on selected VIX volatility terms (VIX9D, VIX, VIX3M, or VIX6M) in a separate pane. The script computes user-defined short and long moving averages using EMA or SMA. It shades the background red when the short-term moving av

Indicator v5 Volatility & bandsMoving averages
Updated 2 months ago · MIT GitHub repository of [TVT] VIX Short Term Danger

MACD-V

by harryguiacorn
220 stars

MACD-V is a volatility-normalized momentum indicator based on research by Alex Spiroglou. It calculates the standard MACD histogram and normalizes it by dividing by the Average True Range (ATR). Plotted in a separate pane as a colored histogram, it includes us

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of MACD-V

MultiIndicator

by capissimo
114 stars

MultiIndicator combines multiple technical indicators into a single separate pane to save chart space. It calculates and displays market regime detection based on ordinary least squares regression, a Holt exponential smoothing crossover, normalized RSI, ADX, a

Indicator v4 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of MultiIndicator

The AMFM indicator decomposes price movements into amplitude and frequency components using Ehlers' digital signal processing methods. It whitens the derivative as close minus open, then computes AM as the smoothed envelope of the absolute difference over 4 pe

Indicator v6 Volatility & bandsMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of AMFM - Ehlers AM Detector / FM Demodulator

PPO ATR Bands

by cryptorife
75 stars

PPO ATR Bands plots a percentage price oscillator in a separate pane. It compares a Hull average of typical price with a volume-weighted exponential average of Parabolic SAR, then scales three true-range bands around the slow average into matching oscillator l

Indicator v4 Oscillators & momentumMoving averages
Updated 3 years ago · GPL-3.0 GitHub repository of PPO ATR Bands

More Volatility & bands scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers