Type/to search

Bollinger Bands and VWAP based Quantitative Trading Strategy

Common strategy
Created: 2024-01-04 15:59:46
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This strategy combines Bollinger Bands (BB) and Volume Weighted Average Price (VWAP) indicators to make entry and exit decisions. It can discover short-term price anomalies for trading and is suitable for short-term trading.

Strategy Logic

The strategy is mainly based on the following rules for entry and exit:

  1. Fast EMA line above slow EMA line as prerequisite for judging trend

  2. Buy when close price above VWAP indicating upward price

  3. Enter long if close price dipped below BB lower band in last 10 bars indicating price anomaly

  4. Sell when close price goes above BB upper band indicating price reversal

Specifically, it first judges if 50-day EMA is above 200-day EMA to determine the overall trend. Then combined with VWAP to judge if price is in a short-term uptrend. Finally using Bollinger Bands to detect short-term anomaly drop as entry opportunity.

The exit rule is simple, exit when price goes above BB upper band indicating price reversal.

Advantages Analysis

The strategy combines multiple indicators to increase validity of entry signals. Using EMAs to judge overall trend avoids trading against trend. VWAP captures short-term upward momentum. BB detects short-term anomalies as timing for entries.

Risk Analysis

  1. Inaccurate EMA trend judgment causing trading against trend
  2. VWAP more suitable for hourly or intraday data, less efficient in daily data
  3. Improper BB parameter setting, too wide or narrow bands missing signals

To mitigate the risks, parameters of EMA and BB can be adjusted. Test different indicators for trend detection. Use VWAP in lower timeframe. Optimize BB parameter for best bandwidth.

Enhancement Opportunities

  1. Test other indicators for trend detection like MACD
  2. Optimize EMA and BB parameters
  3. Add stop loss mechanism
  4. Add filters to avoid false signals
  5. Backtest on various products and timeframes

Conclusion

The strategy combines BB and VWAP to detect short-term price anomalies as entry timing. Using EMAs to determine overall trend avoids trading against trend. It can quickly discover short-term momentum. Suitable for intraday and short-term trading. Further enhance stability and profitability by optimizing parameters and incorporating more logic.

Source
Pine
/*backtest
start: 2023-12-04 00:00:00
end: 2024-01-03 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © mohanee

//@version=4
Strategy parameters
Strategy parameters
fast EMA
slow EMA
BB SMA Length
BB Source
Stop Loss%
StdDev
Offset
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)