Indicator · Pine Script v4 · On the chart

Sabarobe

by jinjernot

An overlay indicator that stacks many familiar tools on one chart: Bollinger Bands, simple moving averages at 5, 10, 50, 100 and 200, exponential averages at 10, 55, 100 and 200, and an Ichimoku cloud.

View on GitHub

GitHub stars1on the repository
Pine versionv4older, still runs
Lines of code96
Settings11inputs
LicenceNone statedfile: MPL-2.0
Last update3 years ago7 Jan 2023

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

96 lines of Pine Script v4 from Sabarobe.txt, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

Sabarobe.txt
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Jinjernot

//@version=4
study("Sabarobe", overlay=true)

//bollinger
length = input(20, minval=1)
src = input(close, title="Source")
mult = input(2.0, minval=0.001, maxval=50, title="StdDev")
basis = sma(src, length)
dev = mult * stdev(src, length)
upper = basis + dev
lower = basis - dev
offset = input(0, "Offset", type = input.integer, minval = -500, maxval = 500)
plot(basis, "BB Mid", color=#9bbc0f, offset = offset)
p1 = plot(upper, "BB Upper", color=#9bbc0f, offset = offset)
p2 = plot(lower, "BB Lower", color=#9bbc0f, offset = offset)
fill(p1, p2, title = "BB Background", color=color.rgb(33, 150, 243, 95))

//MA

ma5 = sma(close, 5)
ma10 = sma(close, 10)

short = sma(close, 50)
longer = sma(close, 100)
longest = sma(close, 200)

plot(ma5, "MA5", color=#00FF00)
plot(ma10, "MA10", color=#00FF00)

plot(short, "MA50", color=#00FF00)
plot(longer, "MA100", color=#0000FF)
plot(longest, "MA200", color=#FF0000)

//EMA
chiquita = ema(close, 10)
mediana = ema(close, 55)
grandota = ema(close, 100)
grandotota = ema(close, 200)

plot(chiquita, "EMA10", color=#00FF00)
plot(mediana, "EMA55", color=#0000FF)
plot(grandota, "EMA100", color=#FF0000)
plot(grandotota, "EMA200", color=#AAAA00)

//Ichimoku

conversionPeriods = input(9, minval=1, title="Conversion Line Length")
basePeriods = input(26, minval=1, title="Base Line Length")
laggingSpan2Periods = input(52, minval=1, title="Leading Span B Length")
displacement = input(26, minval=1, title="Displacement")
donchian(len) => avg(lowest(len), highest(len))
conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpan2Periods)
plot(conversionLine, color=#2962FF, title="Conversion Line")
plot(baseLine, color=#B71C1C, title="Base Line")
plot(close, offset = -displacement + 1, color=#43A047, title="Lagging Span")
p3 = plot(leadLine1, offset = displacement - 1, color=#A5D6A7,
     title="Leading Span A")
p4 = plot(leadLine2, offset = displacement - 1, color=#EF9A9A,
     title="Leading Span B")
fill(p3, p4, color = leadLine1 > leadLine2 ? color.rgb(67, 160, 71, 90) : color.rgb(244, 67, 54, 90))

//indicador

highesthigh = highest(high, 20)
lowestlow = lowest(low, 20)
bullishEC = close >= open[1] and close[1] < open[1]
bearishEC = close <= open[1] and close[1] > open[1]
displayhigh = highesthigh <= high
displaylow = lowestlow >= low
plotshape(displayhigh and bearishEC, title="Sell", style=shape.triangledown, color=color.red, size = size.normal)
plotshape(displaylow and bullishEC, title="Buy", style=shape.triangleup, location=location.belowbar, color=color.green, size = size.normal)

periodK = input(14, title="K", minval=1)
periodD = input(3, title="D", minval=1)
smoothK = input(3, title="Smooth", minval=1)
k = sma(stoch(close, high, low, periodK), smoothK)
d = sma(k, periodD)

overbought = 80
oversold = 20

co = crossover(k,d) and k[1] < oversold
cu = crossunder(k,d) and k[1] > overbought
coLower = close < valuewhen(co, close, 1)
coUpper = close < valuewhen(cu, close, 1)

plotshape(co, color = color.green, location = location.belowbar)
plotshape(cu, color = color.red, location = location.abovebar)
bgcolor(co and coLower ? color.lime : na)
bgcolor(cu and coUpper ? color.red : na)

Overview

Sabarobe also marks triangles when a reversal-style candle forms at a 20-bar high or low, and markers with background colour when a stochastic crossover leaves overbought or oversold zones. Bollinger, Ichimoku and stochastic lengths are adjustable.

Details

Published by

jinjernot on GitHub

Type

Indicator, Pine Script v4

Draws

On the price chart

Category

Moving averages, Trend, Volatility & bands, Oscillators & momentum

Markets

Any symbol

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.

Topics

pinescript

Settings

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

SettingTypeDefaultVariable
lengthint20length
Sourcesourceclosesrc
StdDevfloat2.0mult
Offsetint0offset
Conversion Line Lengthint9conversionPeriods
Base Line Lengthint26basePeriods
Leading Span B Lengthint52laggingSpan2Periods
Displacementint26displacement
Kint14periodK
Dint3periodD
Smoothint3smoothK
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 1 year ago · None stated GitHub repository of ADX Strategy (original)
56 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
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
14 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 6 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 indicators

Trade Your Charts With a Regulated Broker

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

Compare brokers