Indicator · Pine Script v4 · Own pane

RSI-ADI-Combo [Numchuck]

by DT021

The RSI-ADI-Combo indicator combines Relative Strength Index (RSI), Money Flow Index (MFI), and Average Directional Index (ADX) into a single separate pane visualizer.

View on GitHub

GitHub stars1on the repository
Pine versionv4older, still runs
Lines of code81
Settings5inputs
LicenceGPL-3.0
Last update6 years ago10 Mar 2020

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

81 lines of Pine Script v4 from MyOldCode/RSI-ADI-Combo-[Numchuck]-1.1.pine, published under GPL-3.0. Keep the author's credit and licence lines when you reuse it.

RSI-ADI-Combo-[Numchuck]-1.1.pine
//@version=4
// Version 1.1 - jan 2020 - Bas Willemstijn
study(title="RSI-ADI-Combo [Numchuck]", shorttitle="RSI-ADX", overlay=false)

// RSI gives signal voor bullish or bearish position in combination with Aroon and ADI
src = close
len = input(14, minval=1, title="RSI Length")
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - 100 / (1 + up / down)

plot(rsi, title="RSI", style=plot.style_line, linewidth=3, color=color.black)
band2 = hline(80, title="Overbought signal", linestyle=hline.style_dashed, linewidth=1, color=color.red)
band1 = hline(50, title="Buy/Sell signal Line", linestyle=hline.style_dashed, linewidth=2, color=color.silver)
band0 = hline(20, title="Oversold signal", linestyle=hline.style_dashed, linewidth=1, color=color.lime)

// Money Flow Index
length = input(title="Length", defval=14)

rawMoneyFlow = hlc3 * volume

positiveMoneyFlow = 0.0
positiveMoneyFlow := hlc3 > hlc3[1] ? positiveMoneyFlow + rawMoneyFlow : positiveMoneyFlow
negativeMoneyFlow = 0.0
negativeMoneyFlow := hlc3 < hlc3[1] ? negativeMoneyFlow + rawMoneyFlow : negativeMoneyFlow

moneyFlowRatio = sma(positiveMoneyFlow, length) / sma(negativeMoneyFlow, length)

moneyFlowIndex = 100 - 100 / (1 + moneyFlowRatio)

plot(moneyFlowIndex, title="MFI", style=plot.style_line, linewidth=3, color=color.yellow)

// ADI with AD+ and AD- gives first indication of direction of trend
len2 = input(14, minval=1, title="DI Length")
lensig = input(14, title="ADX Smoothing", minval=1, maxval=50)


up1 = change(high)
down1 = -change(low)
trur = rma(tr, len2)

plus = fixnan(100 * rma(up1 > down1 and up1 > 0 ? up1 : 0, len2) / trur)
minus = fixnan(100 * rma(down1 > up1 and down1 > 0 ? down1 : 0, len2) / trur)

sum = plus + minus
adx = 100 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), lensig)

osob = input(40, title="Exhaustion Level for ADX, default = 40")


col = adx <= 10 ? color.gray : adx > 10 and adx <= 20 and plus > minus ? #98FF98 : 
   adx > 10 and adx <= 20 and plus < minus ? #E77471 : 
   adx > 20 and adx <= osob and plus > minus ? color.lime : 
   adx > 20 and adx <= osob and plus < minus ? color.red : 
   adx > osob and plus > minus ? color.green : 
   adx > osob and plus < minus ? color.maroon : color.white
// barcolor(col)
// //plot(plus, color=lime, title="+DI", style=line, linewidth=3)
// //plot(minus, color=red, title="-DI", style=line, linewidth=3)
plot(adx, color=col, title="ADX", style=plot.style_columns)
plot(0, title="0 Line", style=plot.style_line, linewidth=1, color=color.gray)


plot(10, title="10 Line", style=plot.style_circles, linewidth=1, color=color.gray)

plot(20, title="20 Line", style=plot.style_circles, linewidth=1, color=color.gray)

plot(osob, title="10 Line", style=plot.style_circles, linewidth=1, color=color.gray)

//AROON
// length = input(14, minval=1)
// upper = 100 * (highestbars(high, length+1) + length)/length
// lower = 100 * (lowestbars(low, length+1) + length)/length
// plot(upper, color=#FF6A00)
// plot(lower, color=#0094FF)

// buys = crossover(upper, lower)
// sells = crossover(lower, upper)

// b_color = buys ? color(green,40) : sells ? color(red,40) : na
// bgcolor(b_color)

Overview

RSI-ADI-Combo [Numchuck] plots RSI and MFI line graphs along with a color-coded ADX column histogram that highlights trend strength and direction based on DI relationships and customizable threshold levels. Input settings allow traders to adjust length parameters for RSI, MFI, DI, ADX smoothing, and the ADX exhaustion level. It provides visual momentum and trend strength reference lines without automated execution or repainting logic.

Details

Published by

DT021 on GitHub

Type

Indicator, Pine Script v4

Draws

Separate pane below the chart

Category

Oscillators & momentum, Volume, Volatility & bands

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.

Settings

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

SettingTypeDefaultVariable
RSI Lengthint14len
Lengthint14length
DI Lengthint14len2
ADX Smoothingint14lensig
Exhaustion Level for ADX, default = 40int40osob
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

This indicator standardizes price inputs using z-score normalization before calculating a relative strength index (RSI). It generates trade signals when standardized price components cross over or under the standardized RSI feature. Signals can be filtered by

Indicator v4 Oscillators & momentumVolatility & bands Repaints
Updated 1 year ago · None stated GitHub repository of Preprosessed & Standardized RSI

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

This indicator calculates the Relative Strength Index (RSI) alongside a simple moving average to generate directional momentum signals in a separate pane. It supports Break Flip and Break Continuous scanning modes for long and short setups. A wide array of opt

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of Momentum Setup: RSI Direction Confirmation

NFI v6

by koradiyakaushal
12 stars

This Pine v4 study ports early NostalgiaForInfinity V6 conditions onto the price chart. It computes two Bollinger setups, several EMAs and SMAs, RSI, MFI, a percent SMA spread labeled EWO, a 14-period choppiness value, and short and longer volume medians. Fixe

Indicator v4 Moving averagesVolatility & bands
Updated 5 years ago · MIT GitHub repository of NFI v6

The script calculates a variant of the Fear & Greed Index using rate of return, accumulation distribution money flow weighted by volume, and volatility from VIX. It offers display options for the raw index value or price candles scaled by the index level. Smoo

Indicator v5 Oscillators & momentumVolatility & bands Repaints
Updated 4 years ago · MPL-2.0 GitHub repository of Trading Psychology - Fear & Greed Index by DGT

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