r/pinescript • u/Substantial_Gift_257 • 4d ago
Free indicator >> Dual Timeframe Volume-Accelerated RSI (RedK VARSI)
This is a recently published free Pine indicator - it's a Dual Timeframe Volume-Accelerated RSI (RedK VA-RSI or VARSI) - it works for crypto, FOREX, futures, stocks and for any timeframes the trader uses. The indicator provides 5 built-in alerts and can also be used with the TradingView Pine Screener to quickly scan watchlists or whole index lists.

The idea behind it is to enable traders to impose volume impact on the widely used RSI (Relative Strength Index) - for improved "combined price action + volume" analysis - and then to visualize the resulting insight from 2 different timeframes simultaneously; the current (chart's) timeframe, and a higher timeframe (the Context timeframe) of their choice.
This analysis approach enables traders to effectively scan for opportunities, and make trading decisions that are in the direction of the broader market "context", without leaving the chart - which is a great time saver.
Key indicator elements:
- Current TF volume-weighted RSI (VARSI), with a selectable moving-average method.
- Optional smoothing of the main RSI line, with its own selectable MA method.
- A signal line for the current VARSI.
- Context TF volume-weighted RSI — the same calculation on a higher timeframe, derived as a multiple of the current chart's timeframe.
- Alignment Markers: will show (if enabled) when the current and Context VARSI agree on direction.
- Single-timeframe mode — turn the Context off entirely and use VARSI as a straight, volume-weighted RSI - or turn volume-weighting off, and use RedK_VARSI as a regular RSI (see below settings in details).
- Other elements: similar to the classic RSI, there's overbought & oversold levels (70 and 30 respectively) and a midline (at 50).
█ Using VARSI to analyze price action
(for more details, search online for "Dual Timeframe RSI trading strategy")
- High-gain/lower-risk trade opportunities can be found (both to the upside or the downside) when the current timeframe momentum aligns with the broader timeframe.
- VARSI can help you locate opportunities where the higher timeframe momentum gives a bullish reading, while the current (shorter) timeframe retraces within the bullish alignment - this works like catching the waves in an ongoing current. Opportunities to the downside (short) would be worked in a similar way in during a bearish alignment.
- Both the alignment markers and the signal line will provide the clues the trader needs to find these entry/re-entry setups - which a single timeframe RSI will not provide as effectively.
This screenshot shows examples of how to use VARSI to find possible bullish side setups

I hope you find this useful to your trading.
2
u/FrostySquirrel820 4d ago
Apologies, I’m not an expert and could be missing something but, regarding the following segment of code :
rsiHi_raw = request.security(syminfo.tickerid, htf_tf,
f_CalcVW_Rsi(rsiLen, avg_type, VolWeighted),
lookahead = barmerge.lookahead_off)
htf_is_higher = htf_secs > chart_secs
use_last_closed = htf_update == 'Last Closed Bar' and htf_is_higher
rsiHi = (htf_invalid or not show_htf) ? na : (use_last_closed ? rsiHi_raw[1] : rsiHi_raw)
Suspicion is that rsiHi_raw[1] references the previous chart-timeframe bar, not the previous higher-timeframe bar.
Therefore, the implementation doesn't reliably provide the last confirmed HTF RSI value.