Strategy vault / Mean reversion
VWMA SMA Bollinger Bands RSI Strategy Analyzing Price and Volume Correlation
In this article, we will explore a modified trading strategy that combines the Volume Weighted Moving Average (VWMA), Simple Moving Average (SMA) Bollinger Bands, and Relative Strength Index (RSI) indicators. This…
In this article, we will explore a modified trading strategy that combines the Volume Weighted Moving Average (VWMA), Simple Moving Average (SMA) Bollinger Bands, and Relative Strength Index (RSI) indicators. This strategy, developed by BiO618 based on ChartArt's original "CA_RSI_Bolling_Strat," aims to identify potential buying and selling opportunities by examining the correlation between price changes and volume changes. By understanding and interpreting the signals generated by this strategy, traders can make informed decisions to capitalize on market trends.
Keywords: VWMA, SMA Bollinger Bands, RSI, trading strategy, price-volume correlation, technical analysis, market trends, buying and selling opportunities
VWMA (Volume Weighted Moving Average): The VWMA is a variation of the traditional Simple Moving Average, where each data point is weighted based on its corresponding volume. This indicator provides a faster correlation between price and volume changes. As the volume increases, the VWMA decreases, indicating potential changes in market sentiment.
SMA Bollinger Bands: The Bollinger Bands consist of three lines: the SMA basis line, the upper band (SMA + 2 standard deviations), and the lower band (SMA - 2 standard deviations). The SMA basis line is calculated using a specified period length. The Bollinger Bands help identify overbought and oversold conditions in the market.
RSI (Relative Strength Index): The RSI is a momentum oscillator that measures the speed and change of price movements. It oscillates between 0 and 100 and is commonly used to identify overbought and oversold conditions. The RSI can provide valuable insights into the strength and direction of a trend.
Interpreting the Strategy:
a. Price and VWMA Movement:
If the price reaches the upper Bollinger Band and the VWMA follows it closely, it suggests that the price has increased more than the corresponding volume. This may indicate a potential correction or reversal in the near future. If the price reaches the lower Bollinger Band and the VWMA follows it closely, it suggests that the price has dipped with significant volume. This may indicate a continuation of the current trend. b. Price and VWMA Relationship to SMA:
If the price reaches the upper Bollinger Band and the VWMA stays close to the SMA basis line, it suggests that the price has grown with a corresponding volume. This may indicate a continuation of the current trend. If the price reaches the lower Bollinger Band and the VWMA stays close to the SMA basis line, it suggests that the price has dipped with low volume. This may indicate a potential correction or reversal in the near future. Remember, No Indicator is Flawless: It's important to note that no indicator can guarantee accurate predictions in the market. Therefore, it is recommended to support your interpretation of this strategy with other indicators such as the Moving Average Convergence Divergence (MACD) and additional analysis tools.
Conclusion: The VWMA + SMA Bollinger Bands + RSI strategy offers traders a comprehensive approach to analyze price and volume correlation. By understanding the signals generated by this strategy, traders can make informed decisions and enhance their trading strategies. However, it is crucial to remember that no strategy is foolproof, and traders should exercise caution and conduct thorough analysis before executing trades.
Parameters
| Name | Default | What it controls |
|---|---|---|
| v_input_1 | 16 | RSI Period Length |
| v_input_2 | 45 | RSI Value Range |
| v_input_3 | 20 | Bollinger Bands SMA Period Length |
| v_input_4 | 2 | Bollinger Bands Standard Deviation |
| v_input_5 | true | Enable Bar Color? |
| v_input_6 | true | Enable Background Color? |
Source Pine Script
/*backtest
start: 2022-08-31 00:00:00
end: 2023-09-06 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=3
//@version=2
// strategy("VWMA + SMA BBollinger + RSI, Double Strategy (by ChartArt) mod by BiO618", shorttitle="VWMA_Bol_Strat", overlay=true)
// ChartArt's RSI + Bollinger Bands, Double Strategy
//
// Version 1.0
// Idea by ChartArt on January 14, 2015.
//
// This strategy uses a modfied RSI to sell
// when the RSI increases over the value of 55
// (or to buy when the value falls below 45),
// with the classic Bollinger Bands strategy
// to sell when the price is above the
// upper Bollinger Band (and to buy when
// this value is below the lower band).
//
// This simple strategy only triggers when
// both the RSI and the Bollinger Bands
// indicators are at the same time in
// a overbought or oversold condition.
//
// List of my work:
// https://www.tradingview.com/u/ChartArt/
//
// __ __ ___ __ ___
// / ` |__| /\ |__) | /\ |__) |
// \__, | | /~~\ | \ | /~~\ | \ |
//
//
///////////// RSI
RSIlength = input( 16 ,title="RSI Period Length")
RSIvalue = input( 45 ,title="RSI Value Range")
RSIoverSold = 0 + RSIvalue
RSIoverBought = 100 - RSIvalue
price = close
vrsi = rsi(price, RSIlength)
///////////// Bollinger Bands
BBlength = input(20, minval=1,title="Bollinger Bands SMA Period Length")
BBmult = input(2.0, minval=0.001, maxval=50,title="Bollinger Bands Standard Deviation")
BBbasis = sma(price, BBlength)
BBdev = BBmult * stdev(price, BBlength)
BBupper = BBbasis + BBdev
BBlower = BBbasis - BBdev
source = close
buyEntry = crossover(source, BBlower)
sellEntry = crossunder(source, BBupper)
plot(BBbasis, color=aqua,title="Bollinger Bands SMA Basis Line")
p1 = plot(BBupper, color=silver,title="Bollinger Bands Upper Line")
p2 = plot(BBlower, color=silver,title="Bollinger Bands Lower Line")
fill(p1, p2)
basis2 = vwma(source, BBlength) //Notice that the basis is based on a vwma and not a sma.
vwma = plot(basis2, color=orange, linewidth=2, title="Basis")
///////////// Colors
switch1=input(true, title="Enable Bar Color?")
switch2=input(true, title="Enable Background Color?")
TrendColor = RSIoverBought and (price[1] > BBupper and price < BBupper) ? red : RSIoverSold and (price[1] < BBlower and price > BBlower) ? green : na
barcolor(switch1?TrendColor:na)
bgcolor(switch2?TrendColor:na,transp=50)
///////////// RSI + Bollinger Bands Strategy
if (not na(vrsi))
if (crossover(vrsi, RSIoverSold) and crossover(source, BBlower))
strategy.entry("RSI_BB_L", strategy.long, stop=BBlower, comment="RSI_BB_L")
else
strategy.cancel(id="RSI_BB_L")
if (crossunder(vrsi, RSIoverBought) and crossunder(source, BBupper))
strategy.entry("RSI_BB_S", strategy.short, stop=BBupper, comment="RSI_BB_S")
else
strategy.cancel(id="RSI_BB_S")
Published by ChaoZhang on the FMZ strategy square · last modified 2023-09-07. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.
Build this with AgenKit
A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/VWMA-SMA-Bollinger-Bands-RSI-Strategy-Analyzing-Price-and-Volume-Correlation.md- npx agenkit install engineering-kit in your project
- Paste the command into your agent and approve each phase
- Get tests, backtest, risk controls and a paper-trading switch
Understand it first
Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.
Related specs
- Advanced 15 Minute Chart Trading Signal StrategyPine Script · Mean reversion · 3h
- Advanced Quantitative Trading Strategy Combining RSI Divergence and Moving AveragesPine Script · Mean reversion · 1h
- Bollinger Bands Stochastic RSI Extreme Strategy BBSR Extreme StrategyPine Script · Mean reversion · 1h
- Dual Moving Average RSI Synergy Options Quantitative Trading StrategyPine Script · Mean reversion · 1h
- Gods Bollinger Bands RSI Trading StrategyPine Script · Mean reversion · 1d
- Multi Indicator Reversal Point Capture Trading StrategyPine Script · Mean reversion · 1d