SuperCharting
Sign in Get started Account Open charts

Learn / Indicators

Indicators on indicators: use one indicator's plot as another's source

How to apply indicators on indicators in SuperCharting: pick another indicator's plot as Source, such as an EMA of RSI, plus the limits and an alert workaround.

Indicators on indicators means feeding one indicator's line into another, for example a 9-bar EMA calculated on RSI instead of on price. In SuperCharting any indicator with a Source input can read the plot of another indicator on the same chart. You choose it in the Settings dialog, and the link is saved with your layout. This page shows how to set it up, which combinations work, and what it does not do yet.

How it works

Many built-ins have a Source input, normally set to a price such as Close or hlc3. In SuperCharting, that drop-down lists the usual price sources first:

After those, it lists every named plot of every other indicator on the same chart, written as "indicator name: plot name". With RSI on the chart you will see "Relative strength index: RSI" and, if its smoothing is on, "Relative strength index: RSI-based MA".

When you pick one, the second indicator runs on that plot's values bar by bar. If the first indicator has not finished calculating, the second waits for it. When the first updates on a new bar or tick, the second is recalculated too. The legend shows what it is reading, for example "EMA 9 RSI".

How to plot an EMA of RSI in SuperCharting

  1. Open a chart, for example NSE:NIFTY on the 1h interval.
  2. Click Indicators and add Relative strength index. It opens in a pane below the price.
  3. Add Exponential moving average from the same dialog. It is drawn on the price pane at first.
  4. Hover the EMA's legend line, click the gear, and on the Inputs tab open Source.
  5. Scroll past the price sources and pick Relative strength index: RSI. Set Length to 9.
  6. Click Ok. The EMA now runs from 0 to 100 and follows RSI.
  7. Open the EMA's legend More menu, choose Move to and then Existing pane below. The EMA moves into the RSI pane, where both lines share a scale.

Step 7 matters. SuperCharting does not move the dependent indicator into its source's pane by itself, so until you move it, a 0–100 line sits on a price scale.

Useful combinations

Second indicatorSource plotWhat it gives you
Exponential moving averageRelative strength index: RSIA signal line for RSI
Bollinger BandsRelative strength index: RSIBands that adapt to RSI's own range
Simple moving averageOn-balance volume: OnBalanceVolumeA trend line for OBV
Moving average convergence divergenceAny oscillator's plotMomentum of the oscillator
Relative strength indexMoving average convergence divergence: HistogramRSI of the MACD histogram

The exact plot names come from each script, so pick them from the list instead of typing. Any built-in or own script with a Source input can be the second indicator, including Bollinger Bands, MACD, RSI, every moving average, and your own scripts.

Indicators without a Source input, such as Supertrend or Average true range, can be a source but cannot read one.

What it does and does not do

Doing it in one script, with alerts

To get an alert on a combination, for example RSI crossing its own EMA, put both calculations in one script. Save this in the Script Editor and add it from My scripts:

//@version=6
indicator("RSI with its EMA", "RSI + EMA")
rsiLen = input.int(14, "RSI length", minval = 1)
emaLen = input.int(9, "EMA of RSI", minval = 1)
r = ta.rsi(close, rsiLen)
e = ta.ema(r, emaLen)
plot(r, "RSI", color.purple)
plot(e, "EMA of RSI", color.orange)
hline(50, "Middle")
alertcondition(ta.crossover(r, e), "RSI crossed above its EMA", "RSI crossed above its EMA")

Then choose Add alert on RSI + EMA… in its legend's More menu. Set Trigger to Once per bar close and pick your notifications. Details are in price alerts.

Making your own script accept another indicator

If you want your own script to be chainable, declare its source with input.source. Its Source drop-down will then list other indicators' plots, just like the built-ins:

//@version=6
indicator("Smoothed source", "Smooth", overlay = true)
src = input.source(close, "Source")
len = input.int(9, "Length", minval = 1)
plot(ta.ema(src, len), "Smoothed", color.orange, 2)

Give every plot a title, as in "Smoothed" above, so other indicators can find it by name.

Frequently asked questions

Can I chain more than two indicators?

Each link is set the same way. The source list shows every named plot on the chart, including indicators that read another indicator. Check the result on the chart after each step.

Why is the second indicator flat or empty?

Usually the source indicator was removed, or it shows an error. Open Settings and look at Source. A choice ending in "(removed)" needs replacing.

Does this work in Bar Replay and on phones?

Yes. Both indicators are calculated as usual and replay shows them up to the replayed bar. On a phone the Settings dialog has the same Source list.

Is there a limit?

Each indicator counts towards the 50 indicators a chart can carry. For more about each built-in, see the technical indicators library.

Try it on a live chart

SuperCharting runs in your browser: charts, Pine-compatible scripts, the Strategy Tester, alerts and the screener, with Indian and global markets.

Create a free account More guides