Indicator · Pine Script v4 · Own pane

Beep Boop

by magic8bot

This indicator calculates a modified MACD oscillator and signal line alongside a trend EMA filter, plotting the output as a stylized column histogram in a separate pane.

View on GitHub

GitHub stars409on the repository
Pine versionv4older, still runs
Lines of code62
Settings7inputs
LicenceMIT
Last update3 years ago3 Mar 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

62 lines of Pine Script v4 from pine/beep-boop.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

beep-boop.pine
//@version=4

study(title="Beep Boop", shorttitle="Beep Boop", resolution="")

src = input(title="Source", type=input.source, defval=close)

fast_length = input(title="Fast Length", type=input.integer, defval=12)
slow_length = input(title="Slow Length", type=input.integer, defval=26)
EMATrend = input(title="EMA Trend", type=input.integer, defval=50)
signal_length = input(title="Signal Smoothing", type=input.integer, minval = 1, maxval = 50, defval = 9)

sma_source = input(title="Simple MA(Oscillator)", type=input.bool, defval=false)
sma_signal = input(title="Simple MA(Signal Line)", type=input.bool, defval=false)

fast_ma = sma_source
  ? sma(src, fast_length)
  : ema(src, fast_length)

slow_ma = sma_source
  ? sma(src, slow_length)
  : ema(src, slow_length)

macd = fast_ma - slow_ma

signal = sma_signal
  ? sma(macd, signal_length)
  : ema(macd, signal_length)

hist = macd - signal

if (hist > 0)
    hist := 0.1
    
if (hist < 0)
    hist := 0.09
  
fastMA = ema(close, EMATrend)

plot(
  hist,
  title="Histogram",
  style=plot.style_columns,
  color=(
    hist == 0.1
    ? (
      (hist == 0.1)
      and (close > fastMA)
      and (open > fastMA)
      and (low > fastMA)
        ? col_grow_above
        : col_fall_above
    )
    : (
      (hist == 0.09)
      and (close < fastMA)
      and (open < fastMA)
      and (high < fastMA)
        ? col_grow_below
        : col_fall_below
    )
  ), transp=0 
)

Overview

Instead of plotting true MACD distance, it quantifies positive and negative histogram momentum into fixed height levels and colors the bars based on whether price action remains entirely above or below the trend moving average. Configurable inputs include the fast, slow, and signal smoothing lengths, choice of moving average types, and trend EMA length.

Details

Published by

magic8bot on GitHub

Type

Indicator, Pine Script v4

Draws

Separate pane below the chart

Category

Oscillators & momentum, Trend, Moving averages

Markets

Crypto

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

cryptocurrencytrading-botnodejstypescriptbitcoin

Settings

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

SettingTypeDefaultVariable
Sourcesourceclosesrc
Fast Lengthint12fast_length
Slow Lengthint26slow_length
EMA Trendint50EMATrend
Signal Smoothingint9signal_length
Simple MA(Oscillator)boolfalsesma_source
Simple MA(Signal Line)boolfalsesma_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

218 stars

Multi-Timeframe Analysis Suite calculates trend direction and momentum conditions across five user-selected timeframes using moving averages, RSI, and Stochastic oscillators. It evaluates moving average slope and oscillator levels to compute trend alignment, m

Indicator v6 Screeners & dashboardsTrend
Updated 3 months ago · None stated GitHub repository of Multi-Timeframe Analysis Suite

KamaFama

by Mastaaa1987
141 stars

KamaFama is an indicator that translates a Freqtrade trading strategy into Pine Script for visualization. It combines Kaufman Adaptive Moving Average (KAMA), MAMA/FAMA calculations derived via Hilbert Transform, Williams %R, and correlation trend filters to ev

Indicator v6 Moving averagesOscillators & momentum
Updated 6 weeks ago · MIT GitHub repository of KamaFama

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

Elder Impulse System

by mihakralj
99 stars

Elder Impulse System plots a column series in a separate pane. It compares a 13-period exponential moving average with its previous value and a MACD histogram with its previous value. A rising EMA and rising histogram print 1, a falling EMA and falling histogr

Indicator v5 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Elder Impulse System
47 stars

This indicator calculates the Williams Gator Oscillator derived from Bill Williams Alligator lines and plots dual histograms in a separate pane. The upper histogram displays the absolute difference between the Jaw and Teeth moving averages, while the lower his

Indicator v6 Oscillators & momentumMoving averages
Updated 8 months ago · MIT GitHub repository of Williams Gator Oscillator
43 stars

This indicator plots the percentage difference between a fast exponential moving average and a slow one, scaled by the close, in a separate pane. It treats that gap as a standardized measure of trend strength and draws a zero line. Users set both EMA lengths a

Indicator v5 Moving averagesOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Standardized MA Difference

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