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:
- Open, High, Low, Close
- (H + L)/2, (H + L + C)/3, (O + H + L + C)/4, (H + L + C + C)/4
- Volume
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
- Open a chart, for example NSE:NIFTY on the 1h interval.
- Click Indicators and add Relative strength index. It opens in a pane below the price.
- Add Exponential moving average from the same dialog. It is drawn on the price pane at first.
- Hover the EMA's legend line, click the gear, and on the Inputs tab open Source.
- Scroll past the price sources and pick Relative strength index: RSI. Set Length to 9.
- Click Ok. The EMA now runs from 0 to 100 and follows RSI.
- 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 indicator | Source plot | What it gives you |
|---|---|---|
| Exponential moving average | Relative strength index: RSI | A signal line for RSI |
| Bollinger Bands | Relative strength index: RSI | Bands that adapt to RSI's own range |
| Simple moving average | On-balance volume: OnBalanceVolume | A trend line for OBV |
| Moving average convergence divergence | Any oscillator's plot | Momentum of the oscillator |
| Relative strength index | Moving average convergence divergence: Histogram | RSI 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
- Same chart only. The list shows indicators on the chart you are editing, not on other charts in the layout. Compared symbols are not listed.
- Plots only. Band lines drawn with fixed values, such as RSI's 70 and 30, are not plots and are not listed. Indicators showing an error are left out.
- Saved with the layout. The link survives a page reload, because each indicator's identity is saved with the chart.
- Removing the source. If you remove the first indicator, the second shows its old choice as "plot name (removed)" and draws nothing, because there are no values to read. Pick another source to bring it back.
- Templates. An indicator template stores both indicators with their settings, so a saved EMA-on-RSI set can be applied to another chart in one step.
- Alerts. An indicator alert runs the script with its default inputs, on its own, so the link to another indicator is not part of the alert. See the workaround below.
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.