TradingView chart workflows

How to Overlay Two Indicators in the Same TradingView Pane

Right-click the indicator name or one of its plots, open Move to, and choose the existing pane containing the other indicator. You can also select and drag an indicator into another pane. Then check Pin to scale: use the same scale for comparable values, or separate scales for different units. Moving indicators changes their placement; it does not combine their source code or calculations.

See the decision guide

Move an indicator into an existing pane

Add both indicators to the chart first. On the web or desktop chart, right-click the name or plotted line of the indicator you want to move. The Move to menu offers destinations based on your current pane arrangement.

  • Choose an existing pane above or below that contains the other indicator. Choosing a new pane creates another window instead.
  • Alternatively, select the indicator and drag it into the destination pane. Confirm that both indicator names appear there.
  • To separate them again, open the moved indicator menu and choose a new pane.
  • Check both values in the Data Window before and after the move. With inputs and chart data unchanged, relocation should not change their calculations.

Match the vertical scale to the units

Sharing a window does not make different units comparable. If large values dominate a shared axis, a smaller series can look flat. Open Pin to scale from the indicator menu and inspect which axis each indicator uses. A left or right position alone does not identify the scale; charts can have more than one scale on a side.

  • If an average floats away from candles, check whether it uses No scale or a different scale from price.
  • For different units, choose a new left or right scale where offered. Check the indicator label and corresponding axis after pinning.
  • If you normalize a series in code, label the transformed values. Rolling normalization changes the visual amplitude and meaning of thresholds.
CombinationScale choiceInterpretation
Moving average and pricePin both to the same price scaleAn average should remain attached to its corresponding price when you pan or zoom.
RSI and StochasticA shared scale can work because both use a 0 to 100 rangeTheir formulas and thresholds still differ. A crossing between them has no automatic trading meaning.
RSI and MACDUse separate scales, or retain separate panesMACD has no fixed numeric range. A crossing drawn between independently scaled lines does not compare equal values.
Volume and an oscillatorUse separate scales, or retain separate panesVolume units and oscillator readings are different quantities; read each against its own axis.

What overlay and force_overlay control

overlay=false gives a newly added script its own pane. overlay=true normally places it on the main chart; adding it through another indicator's Add indicator/strategy on menu can place it in that indicator's pane. These are initial placement rules, and users can subsequently move the script through the chart interface.

  • force_overlay=true on a supported output function draws that visual in the main chart pane using its scale. It cannot select an arbitrary oscillator pane.
  • scale.left or scale.right applies to the script, not to individual plot calls. It does not assign RSI and MACD separate axes inside one script pane.
  • After changing overlay or scale in the declaration, remove the existing instance and add the script again to see the new defaults.
  • A script can keep oscillator plots in its pane and send price plots to the main chart. It cannot create several independent oscillator panes from individual plot calls.

Pine Script example: two oscillators in one pane

This complete Pine v6 example plots RSI and a smoothed Stochastic %K on the same numeric scale. An optional EMA uses force_overlay to appear on price. The example demonstrates placement only; it defines no entries, exits, or alerts.

  • Paste the example into a new indicator in Pine Editor and add it to the chart. Expect one oscillator pane.
  • Enable Show EMA on price chart. Expect the orange EMA on candles while RSI and Stochastic stay below.
  • Compare values with separate RSI, Stochastic, and EMA indicators using matching lengths, source, smoothing, and timeframe. The example omits the Stochastic %D line.
  • These are reproducible checks for your chart. A syntax check alone does not verify visual placement or real-time behavior.
RSI and Stochastic share the pane; the optional EMA uses the main chartpinescript
//@version=6
indicator("Shared oscillator pane", overlay = false, precision = 2)

int rsiLength = input.int(14, "RSI length", minval = 1)
int stochLength = input.int(14, "Stochastic length", minval = 1)
int smoothing = input.int(3, "Stochastic smoothing", minval = 1)
bool showEma = input.bool(false, "Show EMA on price chart")
int emaLength = input.int(20, "EMA length", minval = 1)

float rsiValue = ta.rsi(close, rsiLength)
float stochValue = ta.sma(ta.stoch(close, high, low, stochLength), smoothing)
float emaValue = ta.ema(close, emaLength)

plot(rsiValue, "RSI", color = color.purple, linewidth = 2)
plot(stochValue, "Smoothed Stochastic K", color = color.blue)
hline(0, "Lower bound", color = color.gray)
hline(100, "Upper bound", color = color.gray)
plot(showEma ? emaValue : na, "EMA on price", color = color.orange, force_overlay = true)

When combining source code is useful

A combined script can reuse calculations and express custom conditions in one place. Use compatible Pine versions, keep one version annotation and one indicator declaration, and resolve conflicting variable names. Large merged scripts still face Pine resource limits. Compatible units or an explicit rescaling method remain necessary for plots sharing a script pane.

  • You need accessible source and permission to reuse it. Moving a protected indicator does not expose its code.
  • Separate scripts can expose plot values through source inputs when designed to do so. They do not automatically share arbitrary internal variables because they occupy the same pane.
  • Code merging is not required for every combined alert. TradingView currently offers multi-condition alerts on Plus and higher plans: up to five conditions, all on the same symbol, must be true together. Strategies and scripts using alert() are not supported by that feature.
  • Choose custom Pine logic when the native alert conditions do not express your rule. Pane placement itself neither creates nor combines alert conditions.
Where Pineify fits

Visual Pine Script Editor

Build a script from supported indicators, conditions, and plots when you need shared logic. Check the generated script's pane and scale choices in TradingView.

Also useful: Pine Script AI Coding Agent. Use source code you are allowed to edit to request a combined script, with explicit requirements for pane placement, units, and alert behavior. Review and test the result.

Explore the Visual Editor

Frequently asked questions

This guide covers chart layout and script behavior. Shared panes and indicator combinations do not establish a trading edge or provide investment advice.

Sources and verification

Published by Pineify. Pineify is an independent product and is not affiliated with TradingView. Sources support the technical explanations; examples do not establish trading performance.