OPEN-SOURCE SCRIPT
RSI + MACD

I got tired of burning two indicator slots on RSI and MACD, so I put both into one script. Same classic RSI and MACD you already know, just stacked in a single pane so you only use one slot.
What it does
RSI sits on the bottom (0 to 100) with the usual 30, 50 and 70 levels and the shaded band between 30 and 70. MACD sits on top with the MACD line, signal line and the four-color histogram that shows whether momentum is building or fading. Both use the standard TradingView colors and formulas, nothing custom or modified.
How it works
A script can only live in one pane, so I stacked them instead. RSI uses its normal 0 to 100 scale. MACD is auto-scaled to fit its own band above RSI, based on its recent range, and the lookback for that is adjustable in the settings. The numbers on the price axis aren’t the real MACD values because of that scaling. The actual RSI, MACD, signal and histogram readings are in the status line at the top of the pane, so you always see the true numbers.
Settings
RSI length and source (default 14, close)
MACD fast, slow and signal lengths (default 12, 26, 9)
MACD scale lookback (default 200 bars), which controls how tall the MACD swings look
Alerts included
MACD crossing above or below the signal line
RSI moving back above 30 or back below 70
How to use it
Use it the same way you would use RSI and MACD separately. Look at MACD crosses and histogram momentum for trend and timing, and RSI for overbought and oversold conditions. It works best when you look for the two agreeing with each other, like a MACD bullish cross while RSI is coming up out of oversold.
Heads up
This is a standard RSI and MACD, so it isn’t a signal generator on its own. Both indicators lag and can give false signals in choppy markets, so use it alongside your own analysis and risk management. This is for educational purposes only and isn’t financial advice.
If you find it useful, a like or a comment helps. Let me know if you want any changes or additions.
What it does
RSI sits on the bottom (0 to 100) with the usual 30, 50 and 70 levels and the shaded band between 30 and 70. MACD sits on top with the MACD line, signal line and the four-color histogram that shows whether momentum is building or fading. Both use the standard TradingView colors and formulas, nothing custom or modified.
How it works
A script can only live in one pane, so I stacked them instead. RSI uses its normal 0 to 100 scale. MACD is auto-scaled to fit its own band above RSI, based on its recent range, and the lookback for that is adjustable in the settings. The numbers on the price axis aren’t the real MACD values because of that scaling. The actual RSI, MACD, signal and histogram readings are in the status line at the top of the pane, so you always see the true numbers.
Settings
RSI length and source (default 14, close)
MACD fast, slow and signal lengths (default 12, 26, 9)
MACD scale lookback (default 200 bars), which controls how tall the MACD swings look
Alerts included
MACD crossing above or below the signal line
RSI moving back above 30 or back below 70
How to use it
Use it the same way you would use RSI and MACD separately. Look at MACD crosses and histogram momentum for trend and timing, and RSI for overbought and oversold conditions. It works best when you look for the two agreeing with each other, like a MACD bullish cross while RSI is coming up out of oversold.
Heads up
This is a standard RSI and MACD, so it isn’t a signal generator on its own. Both indicators lag and can give false signals in choppy markets, so use it alongside your own analysis and risk management. This is for educational purposes only and isn’t financial advice.
If you find it useful, a like or a comment helps. Let me know if you want any changes or additions.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。