Indicator · Pine Script v6 · On the chart

V9 Sniper Visualizer (+ Crosses)

by fatemeh231· code credited to Fatemeh-Hosseini-Nasab1

The V9 Sniper Visualizer plots a multi-period exponential moving average ribbon, Parabolic SAR, and moving average crossover markers directly on the main price chart.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code101
Settings11inputs
LicenceNone statedfile: MPL-2.0
Last update3 weeks ago1 Nov 2026

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

101 lines of Pine Script v6 from pine_script/v9_sniper_visualizer.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

v9_sniper_visualizer.pine
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Fatemeh-Hosseini-Nasab1

//@version=6
indicator("V9 Sniper Visualizer (+ Crosses)", overlay=true, max_lines_count=500, max_labels_count=500)

// ==========================================
// 1. INPUTS
// ==========================================
rsi_len = input.int(14, "RSI Length")
atr_len = input.int(14, "ATR Length")

// EMAs
ema5_len   = input.int(5, "EMA 5")
ema20_len  = input.int(20, "EMA 20")
ema50_len  = input.int(50, "EMA 50")
ema75_len  = input.int(75, "EMA 75")
ema100_len = input.int(100, "EMA 100")
ema150_len = input.int(150, "EMA 150")

// SAR
sar_start = input.float(0.02, "SAR Start")
sar_inc   = input.float(0.02, "SAR Increment")
sar_max   = input.float(0.2, "SAR Max")

// ==========================================
// 2. INDICATORS CALCULATION
// ==========================================
rsi = ta.rsi(close, rsi_len)
rsi_chg = rsi - rsi[1] // RSI Change

atr = ta.atr(atr_len)

ema5   = ta.ema(close, ema5_len)
ema20  = ta.ema(close, ema20_len)
ema50  = ta.ema(close, ema50_len)
ema75  = ta.ema(close, ema75_len)
ema100 = ta.ema(close, ema100_len)
ema150 = ta.ema(close, ema150_len)

sar = ta.sar(sar_start, sar_inc, sar_max)

// ==========================================
// 3. PLOTTING INDICATORS
// ==========================================
plot(ema5,   "EMA 5",   color=color.new(#03edf5, 0), linewidth=3)
plot(ema20,  "EMA 20",  color=color.new(#20f105, 0), linewidth=3)
plot(ema50,  "EMA 50",  color=color.new(#ff3c00, 0), linewidth=3)
plot(ema75,  "EMA 75",  color=color.new(#faf9fa, 0), linewidth=3)
plot(ema100, "EMA 100", color=color.new(#c308f1, 0), linewidth=3)
plot(ema150, "EMA 150", color=color.new(#f105d2, 0), linewidth=3)
plot(sar,    "SAR",     color=color.new(#f3f708, 0), style=plot.style_cross, linewidth=2)

// ==========================================
// 4. CROSS VISUALIZATIONS (The + Symbols)
// ==========================================
// 20/50 Cross
cross_20_50_up = ta.crossover(ema20, ema50)
cross_20_50_dn = ta.crossunder(ema20, ema50)

// Using shape.cross (+) for the 20/50 lines
plotshape(cross_20_50_up, title="20/50 UP", style=shape.cross, location=location.abovebar, color=color.new(#0393f3, 0), size=size.large)
plotshape(cross_20_50_dn, title="20/50 DN", style=shape.cross, location=location.abovebar, color=color.new(#021bfc, 0), size=size.large)

// 5/150 Cross
cross_5_150_up = ta.crossover(ema5, ema150)
cross_5_150_dn = ta.crossunder(ema5, ema150)

// Using shape.cross (+) for the 5/150 lines
plotshape(cross_5_150_up, title="5/150 UP", style=shape.cross, location=location.belowbar, color=color.new(#bfd400, 0), size=size.large)
plotshape(cross_5_150_dn, title="5/150 DN", style=shape.cross, location=location.abovebar, color=color.new(#e5ff00, 0), size=size.large)

// ==========================================
// 5. THE SNIPER LOGIC (Validations)
// ==========================================
spike_up = rsi_chg > 10
spike_dn = rsi_chg < -10

trend_up = ema20 > ema50
trend_dn = ema20 < ema50

min_ema = math.min(ema5, ema20, ema50, ema75, ema100, ema150)
max_ema = math.max(ema5, ema20, ema50, ema75, ema100, ema150)

atr_gate_long  = (low - atr) < min_ema
atr_gate_short = (high + atr) > max_ema

valid_long  = spike_up and trend_up and atr_gate_long
valid_short = spike_dn and trend_dn and atr_gate_short

// ==========================================
// 6. DISPLAY SIGNALS & ATR NUMBER
// ==========================================
plotshape(valid_long, title="VALID LONG", style=shape.labelup, location=location.belowbar, color=color.new(color.green, 0), size=size.large, text="LONG")
plotshape(valid_short, title="VALID SHORT", style=shape.labeldown, location=location.abovebar, color=color.new(color.red, 0), size=size.large, text="SHORT")

if valid_long
    label.new(bar_index, low, text="ATR: " + str.tostring(atr, "#.##"), style=label.style_label_up, color=color.new(color.green, 50), textcolor=color.white, size=size.small)

if valid_short
    label.new(bar_index, high, text="ATR: " + str.tostring(atr, "#.##"), style=label.style_label_down, color=color.new(color.red, 50), textcolor=color.white, size=size.small)

Overview

V9 Sniper Visualizer (+ Crosses) identifies directional momentum signals by combining RSI velocity spikes, EMA trend alignment, and an Average True Range volatility gate. Crossovers between key short-term and macro EMAs are highlighted with cross symbols. Traders can customize parameters for RSI, ATR, six EMA lengths, and Parabolic SAR steps.

Details

Published by

fatemeh231 on GitHub

Code credit

Fatemeh-Hosseini-Nasab1, as written in the script's header

Draws

On the price chart

Markets

Crypto

Timeframes

M1-M5, M15-H1

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
RSI Lengthint14rsi_len
ATR Lengthint14atr_len
EMA 5int5ema5_len
EMA 20int20ema20_len
EMA 50int50ema50_len
EMA 75int75ema75_len
EMA 100int100ema100_len
EMA 150int150ema150_len
SAR Startfloat0.02sar_start
SAR Incrementfloat0.02sar_inc
SAR Maxfloat0.2sar_max
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

114 stars

ADX Strategy (original) is an overlay indicator that identifies trend-following trade signals using the Average Directional Index (ADX) combined with a Simple Moving Average filter. A long signal is generated when the ADX rises above a user-defined trend level

Indicator v4 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of ADX Strategy (original)
57 stars

Double Screened Decision is a multi-timeframe trend and momentum indicator overlaid directly on the price chart. It dynamically selects a higher timeframe based on the active chart resolution to evaluate higher-timeframe MACD, Bollinger Bands, RSI, and Stochas

Indicator v5 TrendMoving averages Repaints
Updated 4 months ago · None stated GitHub repository of Double Screened Decision

Bollinger Awesome Alert R1.1 is a price chart overlay indicator designed for scalping setup identification. It calculates Bollinger Bands, a fast exponential moving average, and an Awesome Oscillator. Buy and sell alert signals trigger when the fast EMA crosse

Indicator v4 TrendOscillators & momentum
Updated 2 weeks ago · MIT GitHub repository of Bollinger Awesome Alert R1.1 by JustUncleL
24 stars

This indicator plots Bollinger Bands on the price chart alongside a baseline moving average to identify trend-aligned swing setups. It calculates trend bias by comparing the Bollinger Bands basis to a customizable moving average, such as a 200 EMA. Trade signa

Indicator v5 Volatility & bandsOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of Bollinger Band Swing

Index Intraday Analyst

by chris-c-thomas
13 stars

Index Intraday Analyst overlays CBOE cash indices such as SPX, NDX, RUT, and DJX. It plots a multi-EMA ribbon, a session-anchored TWAP with standard-deviation bands, and session levels such as prior-day high, low, and close, the opening range, and the high and

Indicator v6 TrendOscillators & momentum
Updated 7 months ago · MIT GitHub repository of Index Intraday Analyst

RePaNoCHa V4

by wocclyl
9 stars

RePaNoCHa V4 is an overlay alert indicator that plots a Tillson T3 moving average on the price chart and colors it by whether the line is rising or falling. It combines that slope with a range filter, ADX, parabolic SAR, RSI, and MACD to mark long and short si

Indicator v4 TrendOscillators & momentum
Updated 7 years ago · MIT GitHub repository of RePaNoCHa V4

More Trend 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