What the strategy is trying to do
This is an open-source script by RWCS_LTD. The script title is “RSI + MACD Multi-Timeframe Strategy”. By default it uses daily RSI to judge oversold and overbought conditions, and a 4-hour MACD line crossing its signal line for timing. Both legs must be true on the same chart bar: daily RSI below the oversold level, and the 4-hour MACD — after it has been brought onto the current chart — crossing above its signal, to go long; daily RSI above the overbought level, and that MACD crossing below its signal, to exit. It is long only; there is no short entry. The author's chart is CRYPTO:BTCUSD on the daily timeframe. The rules follow the source; this page does not invent backtest figures.
The publication chart is CRYPTO:BTCUSD on the daily timeframe, so this page files the script under BTC. The source does not hard-code a symbol, so it can be loaded on another chart, but the write-up and the image follow that daily BTC chart. overlay is set to false, so RSI or MACD is drawn in a separate pane. Plot Selector switches between the two; they are not drawn at the same time.

How the indicators are calculated
- Daily RSI is fetched with request.security on RSI Timeframe (1D by default), with length 14 by default. The source does not set lookahead; in Pine v6 the default is lookahead_off.
- Oversold is RSI strictly below the Oversold level (30 by default). Overbought is RSI strictly above the Overbought level (70 by default). A print exactly at the threshold is neither.
- MACD is also fetched with request.security, on MACD Timeframe (240 by default, which is 4 hours), using ta.macd with 12 / 26 / 9 by default. The histogram value is discarded and unused.
- The cross up and cross down are not computed inside the 4-hour chart. They run ta.crossover and ta.crossunder on the MACD series after it has been sampled onto the current chart. On the author's daily chart, a “4-hour MACD cross up” means the 4-hour MACD values sampled on two adjacent daily bars crossed from below the signal to above it. A 4-hour cross that happens during the day and is gone by the time the daily bar is sampled does not fire on its own. If you attach the script to a shorter chart, the crosses are judged on that chart's sampled series, which will not match the daily rhythm.
- On a daily chart, the default RSI Timeframe is also 1D, so the series is essentially that chart's daily RSI, still wrapped in security().
Entry rules
- Long (order name Long): on the current chart bar, daily RSI is oversold and the sampled MACD line crosses above its signal. Both conditions must be true on the same bar.
- There is no short entry and no reverse position.
- The source does not set pyramiding, so Pine's default applies: it will not add to an open long.
Exits and position size
- A long exits when daily RSI is overbought and the sampled MACD line crosses below its signal. Both conditions must also be true on the same bar. If RSI has already left overbought but MACD has not crossed down, the position stays open. There is no stop-loss or take-profit in between.
- The default size is 100% of equity. The source does not set commission, slippage, or initial capital, so Pine or the Strategy Tester defaults apply, which may differ from the author's chart or your own settings.
Inputs (source defaults)
| Input | Default | Role |
|---|---|---|
| Plot Selector | RSI | Whether the pane shows RSI or MACD. Display only; it does not change orders. |
| RSI Timeframe | 1D | Timeframe request.security uses when fetching RSI. |
| RSI Length | 14 | RSI lookback. |
| RSI Overbought Level | 70 | Overbought threshold. RSI must be strictly above this value. |
| RSI Oversold Level | 30 | Oversold threshold. RSI must be strictly below this value. |
| MACD Timeframe | 240 | Timeframe request.security uses when fetching MACD; 240 is 4 hours. |
| MACD Fast Length | 12 | MACD fast length. |
| MACD Slow Length | 26 | MACD slow length. |
| MACD Signal Smoothing | 9 | MACD signal smoothing length. |
Things to know before using it
- Read the “4-hour MACD cross” as a cross of the security-sampled series on the chart timeframe, not as every cross on a 4-hour chart.
- Oversold and overbought use strict comparisons. RSI exactly at 30 or 70 does not qualify.
- The strategy is long only and has no stop. If overbought and a cross down never land on the same bar, a position can stay open for a long time.
- The default size is 100% of equity. If you attach the script to a timeframe other than the author's daily chart, both the daily RSI and the 4-hour MACD are sampled differently, so the daily-chart picture will not transfer directly.
- The pane shows RSI or MACD, not both at once. That is a display choice and does not change the orders.
Installing it on TradingView
- Download the .pine file from Coinpred (active membership required, see below), or check the original page for a newer version.
- Open the Pine Editor, create a blank script, paste the full source, and save.
- Click Add to chart. To match the author image, start with CRYPTO:BTCUSD on the daily timeframe. The indicator appears in a separate pane.
- Review the timeframes, RSI and MACD inputs, and position size in the strategy properties, then inspect fills in the Strategy Tester.
- Past tester results do not guarantee future returns.
About backtest figures
Source, license and version
- Source: https://www.tradingview.com/script/Epqb0L8C-RSI-MACD-Multi-Timeframe-Strategy/
- Author: RWCS_LTD. Source version 1.0 (Pine v6), scriptAccess=open_no_auth.
- License: Mozilla Public License 2.0. Redistribution must keep the copyright and license notices; modified files must remain under MPL 2.0. Coinpred ships the unmodified full source.
- Members can download the .pine file on this page to study the rules. Judge the risk yourself, and follow your venue's rules.



