Type/to search

Altered OBV and MACD Quantitative Trading Strategy

Cryptocurrency
Created: 2023-11-15 17:58:42
Last modified: 3 years ago
1
Follow
1779
Followers

img

Overview

This strategy uses altered On Balance Volume (OBV) and MACD to generate trading signals. It combines price index MACD and altered OBV as a comprehensive indicator for volume and price, aiming to capture trading opportunities when price and volume strengths breakout.

Strategy Logic

  1. Calculate Simple Moving Average (SMA) to determine market trend.

  2. Calculate altered OBV. It modifies the OBV calculation based on close price and previous close price relationship to make OBV more sensitive.

  3. Calculate MACD on altered OBV. MACD consists of fast line, slow line and histogram to identify volume momentum change.

  4. When MACD golden cross and goes up, a buy signal is generated.

  5. When MACD dead cross and goes down, a sell signal is triggered.

  6. Check SMAs to avoid unnecessary trades during trendless market.

Advantage Analysis

  1. Altered OBV is more sensitive to capture early volume changes.

  2. MACD clearly indicates volume momentum change and key levels.

  3. Volume and price combined signal improves accuracy.

  4. SMA filters false signal by determining market trend.

  5. Clear strategy logic and big optimization space.

Risk Analysis

  1. Altered OBV may generate false signals, needs filter by other indicators.

  2. Improper MACD parameters setting may miss trades or cause false signals.

  3. Pay attention to stock specifics to avoid losses.

  4. Monitor market condition as strategy may not work for special scenarios.

  5. Backtest overfit risk may lead to worse performance in live trading.

Optimization Directions

  1. Test different SMA period combinations to optimize market trend determination.

  2. Test MACD parameters to better identify volume momentum change.

  3. Add other indicators as filter, like KDJ, RSI etc.

  4. Add stop loss to limit loss per trade.

  5. Optimize money management to improve overall profitability.

  6. Test parameter differences among stocks.

Conclusion

The strategy combines altered OBV and MACD to achieve volume and price synthesis. It can capture volume momentum change early and generate trading signals. Compared to using OBV or MACD alone, this strategy provides more reliable trading opportunities. However, false signals risk exists and further optimizations on indicators and parameters, plus money management are needed to obtain steady profits in live trading. Overall, the strategy has clear logic and is worth testing and optimizing to explore its potential.

Source
Pine
/*backtest
start: 2022-11-14 00:00:00
end: 2023-11-14 00:00:00
period: 1d
basePeriod: 1h
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/
// © stocktechbot

//@version=5
Strategy parameters
Strategy parameters
Offset
Fast Length
Slow Length
Signal Smoothing
Oscillator MA Type
Signal Line MA Type
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)