If you use TradingView on the free plan, you already know the pain: two indicators per chart, maximum. You add RSI. You add MACD. Now you want a moving average — and TradingView says no.
This is the single biggest frustration for free-plan traders. Reddit threads, YouTube comments, TradingView support tickets — everyone hits this wall eventually.
The good news: Pine Script lets you combine multiple indicators into one. Instead of RSI *plus* MACD *plus* EMA eating three indicator slots, you build a single script that does all three. One slot. Problem solved.
I've been writing Pine Script indicators for my own USDJPY momentum trading setup, and consolidating indicators was one of the first things I learned. This tutorial shows you exactly how — with full code you can copy and paste today.
---
What Is the TradingView Free Plan Indicator Limit?
TradingView's free (Basic) plan allows 2 indicators per chart as of March 2026. That includes:
- Built-in indicators (RSI, MACD, Bollinger Bands, etc.)
- Community scripts from the TradingView library
- Your own custom Pine Script indicators
| Plan | Indicators Per Chart | Price (Annual) |
|---|---|---|
| Basic (Free) | 2 | $0 |
| Essential | 5 | ~$155/year |
| Plus | 10 | ~$299/year |
| Premium | 25 | ~$599/year |
The Workaround: One Script, Multiple Indicators
Pine Script v6 lets you create a single indicator that calculates and displays RSI, EMA, and MACD on the same chart. Since TradingView counts *scripts* — not individual plots — this means three indicators using only one slot.
There are paid tools like Pineify that do this automatically. But you don't need to pay anyone. The code is straightforward, and once you understand the pattern, you can add any indicator you want.
How It Works
A typical setup uses three indicators across two chart areas:
1. EMA (20 and 50) — overlaid on the price chart (main pane)
2. RSI (14) — in a separate pane below the chart 3. MACD (12, 26, 9) — in that same separate pane, or a second oneThe catch: Pine Script indicators can either be overlay=true (drawn on the price chart) or overlay=false (drawn in a separate pane). They can't do both in a single script.
Let me show you both approaches.
---
Approach 1: RSI + MACD in One Pane (Single Script)
This is the simplest and most popular consolidation. RSI and MACD both live below the chart, so they can share one Pine Script indicator.
Full Code — Copy and Paste This
//@version=6
indicator("All-in-One: RSI + MACD", overlay=false)
// ── RSI Settings ──
rsiLength = input.int(14, "RSI Length", minval=1)
rsiSource = input.source(close, "RSI Source")
rsiOverbought = input.int(70, "RSI Overbought")
rsiOversold = input.int(30, "RSI Oversold")
// ── MACD Settings ──
macdFast = input.int(12, "MACD Fast Length", minval=1)
macdSlow = input.int(26, "MACD Slow Length", minval=1)
macdSignal = input.int(9, "MACD Signal Length", minval=1)
macdSource = input.source(close, "MACD Source")
// ── RSI Calculation ──
rsiValue = ta.rsi(rsiSource, rsiLength)
// ── MACD Calculation ──
[macdLine, signalLine, histLine] = ta.macd(macdSource, macdFast, macdSlow, macdSignal)
// ── RSI Plot ──
plot(rsiValue, "RSI", color=color.new(color.purple, 0), linewidth=2)
hline(rsiOverbought, "Overbought", color=color.red, linestyle=hline.style_dotted)
hline(rsiOversold, "Oversold", color=color.green, linestyle=hline.style_dotted)
hline(50, "Midline", color=color.gray, linestyle=hline.style_dotted)
// ── MACD Plot (scaled to RSI range) ──
// MACD values are typically small (-5 to +5) while RSI is 0-100.
// We scale MACD to fit visually alongside RSI.
macdScale = input.float(10.0, "MACD Scale Factor", minval=1.0, step=1.0,
tooltip="Adjusts MACD visual size relative to RSI. Increase if MACD looks flat.")
scaledMacd = macdLine * macdScale + 50
scaledSignal = signalLine * macdScale + 50
scaledHist = histLine * macdScale
// Plot scaled MACD centered around RSI midline (50)
plot(scaledMacd, "MACD Line", color=color.blue, linewidth=1)
plot(scaledSignal, "Signal Line", color=color.orange, linewidth=1)
plot(scaledHist + 50, "Histogram", color=histLine >= 0 ? color.new(color.teal, 50) : color.new(color.red, 50),
style=plot.style_columns)
How to Add This to Your Chart
1. Open TradingView and go to any chart
2. Click Pine Editor at the bottom of the screen 3. Delete the default code and paste the script above 4. Click Add to Chart 5. You now have RSI + MACD using one indicator slotThe MACD is scaled to fit the RSI's 0–100 range. The MACD Scale Factor input in the settings panel lets you adjust how large the MACD lines appear relative to RSI. Start with 10 and increase if your asset has small MACD swings.
---
Approach 2: EMA + RSI + MACD (Two Scripts, Two Slots)
If you also want moving averages on the price chart, you need two scripts:
1. Script A (overlay): EMA 20 + EMA 50 on the price chart
2. Script B (separate pane): RSI + MACD combined (the script from Approach 1)Script A: Dual EMA Overlay
//@version=6
indicator("Dual EMA (20/50)", overlay=true)
emaFast = input.int(20, "Fast EMA", minval=1)
emaSlow = input.int(50, "Slow EMA", minval=1)
src = input.source(close, "Source")
fastLine = ta.ema(src, emaFast)
slowLine = ta.ema(src, emaSlow)
plot(fastLine, "Fast EMA", color=color.new(color.blue, 0), linewidth=2)
plot(slowLine, "Slow EMA", color=color.new(color.red, 0), linewidth=2)
// ── Crossover Signals ──
bullCross = ta.crossover(fastLine, slowLine)
bearCross = ta.crossunder(fastLine, slowLine)
plotshape(bullCross, "Bullish Cross", shape.triangleup, location.belowbar,
color=color.green, size=size.small)
plotshape(bearCross, "Bearish Cross", shape.triangledown, location.abovebar,
color=color.red, size=size.small)
Script B is the RSI + MACD script from Approach 1 above.
Add both scripts to your chart. Two indicator slots used, three indicators displayed. You've maxed out your free plan's capability.
---
Approach 3: The Kitchen Sink (Everything in One Overlay)
Some traders prefer putting oscillator values directly on the price chart as a data table, keeping everything in a single overlay script. Pine Script v6's table feature makes this possible.
//@version=6
indicator("All-in-One Overlay: EMA + RSI/MACD Table", overlay=true)
// ── EMA ──
emaFast = input.int(20, "Fast EMA")
emaSlow = input.int(50, "Slow EMA")
fastEma = ta.ema(close, emaFast)
slowEma = ta.ema(close, emaSlow)
plot(fastEma, "EMA 20", color=color.blue, linewidth=2)
plot(slowEma, "EMA 50", color=color.red, linewidth=2)
// ── RSI ──
rsiVal = ta.rsi(close, 14)
// ── MACD ──
[macdVal, sigVal, histVal] = ta.macd(close, 12, 26, 9)
// ── Info Table ──
var tbl = table.new(position.top_right, 2, 4,
bgcolor=color.new(color.black, 80), border_width=1)
if barstate.islast
table.cell(tbl, 0, 0, "Indicator", text_color=color.white, text_size=size.small)
table.cell(tbl, 1, 0, "Value", text_color=color.white, text_size=size.small)
rsiColor = rsiVal > 70 ? color.red : rsiVal < 30 ? color.green : color.white
table.cell(tbl, 0, 1, "RSI (14)", text_color=color.white, text_size=size.small)
table.cell(tbl, 1, 1, str.tostring(rsiVal, "#.#"), text_color=rsiColor, text_size=size.small)
macdColor = macdVal > sigVal ? color.green : color.red
table.cell(tbl, 0, 2, "MACD", text_color=color.white, text_size=size.small)
table.cell(tbl, 1, 2, str.tostring(macdVal, "#.##"), text_color=macdColor, text_size=size.small)
trendColor = fastEma > slowEma ? color.green : color.red
table.cell(tbl, 0, 3, "Trend", text_color=color.white, text_size=size.small)
table.cell(tbl, 1, 3, fastEma > slowEma ? "BULLISH" : "BEARISH",
text_color=trendColor, text_size=size.small)
This gives you EMA lines on the chart plus a compact data table showing live RSI, MACD, and trend direction — all in one indicator slot. The downside: you lose the visual RSI/MACD chart lines. But for quick reads, the table works surprisingly well.
---
Tips for Building Your Own All-in-One Script
Start Small, Then Add
Don't try to combine five indicators on day one. Start with two that you always use together. Get comfortable reading the combined output. Then add more.Watch the Scale Problem
Indicators with different value ranges (RSI: 0–100, MACD: -5 to +5, ATR: varies by asset) look terrible when plotted together without scaling. Either:- Scale to a common range (like I did with MACD → RSI range above)
- Use the table approach for mismatched indicators
- Use
plot.style_columnsfor histogram-style indicators to reduce visual clutter
Organize Your Inputs
When you combine four indicators into one script, the settings panel becomes a wall of numbers. Group related inputs with clear labels:
// ── RSI Settings ──
rsiLength = input.int(14, "RSI Length", group="RSI")
rsiOB = input.int(70, "Overbought", group="RSI")
rsiOS = input.int(30, "Oversold", group="RSI")
// ── MACD Settings ──
macdFast = input.int(12, "Fast", group="MACD")
macdSlow = input.int(26, "Slow", group="MACD")
The group parameter organizes settings into collapsible sections. Much cleaner.
Color-Code Everything
With multiple indicators sharing space, colors are your lifeline. Use distinct, high-contrast colors and keep them consistent across scripts. My convention:- Blue = fast/short-term
- Red/Orange = slow/long-term
- Green = bullish signals
- Red = bearish signals
- Gray = neutral reference lines
When to Stop Consolidating and Upgrade
The all-in-one approach works, but it has real limits:
Consolidation works well for:- 3–4 indicators that you always use together
- Simple combinations (EMA + RSI, RSI + MACD)
- Traders who want a clean, minimal chart
- You need more than 4–5 indicators and the combined script becomes unreadable
- You want to use community scripts that can't be combined (they're compiled/protected)
- You need multiple charts side-by-side (Essential plan gives you 2 charts in a layout)
- You rely on TradingView's built-in screener or alerts heavily — both work better with individual indicators
---
Common Questions
Can I Combine Protected Community Scripts?
No. If a community script is compiled (invite-only or protected source), you can't extract the code to merge it with other indicators. This only works with open-source scripts or your own code.
Does Combining Indicators Affect Performance?
Negligible. Pine Script calculates all plots on each bar regardless of whether they're in one script or three. One combined script might even be marginally faster since TradingView loads one runtime instead of two.
Can I Add Alerts to a Combined Script?
Yes. Use alertcondition() like you normally would:
alertcondition(rsiValue > rsiOverbought and histLine < 0,
title="RSI Overbought + MACD Bearish",
message="{{ticker}}: RSI above 70 with bearish MACD histogram")
Combined alerts are actually one of the biggest advantages of all-in-one scripts — you can create cross-indicator alert conditions that would be impossible with separate indicators.
Will This Work on Pine Script v5?
The code above is written for Pine Script v6, but the core functions (ta.rsi, ta.macd, ta.ema, table.new) all exist in v5. Change the first line to //@version=5 and it should work with minimal adjustments. If you're migrating from v5 to v6, check our Pine Script v5 to v6 migration guide.
---
What's Next
You've got three approaches to combine indicators on TradingView's free plan:
1. RSI + MACD in one oscillator pane — the most popular combo
2. Dual EMA overlay + RSI/MACD pane — uses both indicator slots for a complete setup 3. Single overlay with data table — everything in one slot, sacrificing oscillator charts for compactnessCopy the code, tweak the settings for your asset and timeframe, and start trading with a fuller picture — no upgrade required.
When you're ready for more firepower, the TradingView Essential plan removes the indicator ceiling entirely. But until then, Pine Script has you covered.
If you're new to Pine Script, our beginner guide walks you through the basics. And for more advanced techniques, the RSI divergence indicator tutorial shows how to build a real trading tool from scratch.
---
*Disclosure: This article contains affiliate links. We may earn a commission if you sign up through our links, at no extra cost to you.*