0bps

Strategy vault / Momentum

Multi Volume Momentum Combined Trading Strategy

This is a comprehensive trading strategy based on 7 different volume indicators. The strategy integrates multiple volume indicators including OBV, A/D Line, CMF, MFI, VWAP, Volume Oscillator, and Volume RSI to build…

Author
ChaoZhang
Complexity
Intermediate · 93 lines
Parameters
0
Backtest bar
1d · swing
Tested on
BTC/USDT · futures

IMG

Overview

This is a comprehensive trading strategy based on 7 different volume indicators. The strategy integrates multiple volume indicators including OBV, A/D Line, CMF, MFI, VWAP, Volume Oscillator, and Volume RSI to build a comprehensive trading system. The core concept is to improve trading accuracy through multiple indicator confirmations, executing trades only when more than 4 indicators simultaneously give buy or sell signals.

Strategy Principles

The strategy employs multiple indicator verification methods, including:

  1. OBV (On-Balance Volume) for tracking cumulative volume changes
  2. A/D Line (Accumulation/Distribution) for price-volume relationships
  3. CMF (Chaikin Money Flow) for measuring money flow
  4. MFI (Money Flow Index) for buying/selling pressure
  5. VWAP (Volume Weighted Average Price) as dynamic support/resistance
  6. Volume Oscillator for volume trend
  7. VRSI (Volume Relative Strength Index) for volume strength

The strategy executes trades when more than 4 indicators simultaneously give consistent signals, indicating strong trend opportunities.

Strategy Advantages

  1. Multiple indicator cross-validation reduces false signals
  2. Combines volume and price analysis methods
  3. Incorporates both momentum and trend-following characteristics
  4. Clear entry and exit conditions
  5. Strong adaptability and scalability

Strategy Risks

  1. Multiple indicators may lead to signal lag
  2. May generate excessive trades in ranging markets
  3. Parameter optimization risks overfitting
  4. Requires significant computational resources
  5. May underperform in low liquidity markets

Optimization Directions

  1. Introduce adaptive parameter mechanisms
  2. Add market volatility filters
  3. Optimize indicator weight distribution
  4. Add stop-loss and profit targets
  5. Consider implementing time filters

Summary

This is a comprehensive trading strategy based on multiple volume indicators that improves trading accuracy through multi-dimensional market analysis. While the strategy has strong theoretical foundations and practical value, it requires appropriate parameter optimization and risk management in practical applications.

Source Pine Script

/*backtest
start: 2024-01-01 00:00:00
end: 2024-11-11 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("Combined Volume Indicators Strategy", overlay=true)

// تنظیمات
lengthRSI = 14
lengthMFI = 14
lengthCMF = 20
fastLength = 5
slowLength = 10

// محاسبه OBV
obv = ta.cum(close > close[1] ? volume : close < close[1] ? -volume : 0)

// محاسبه A/D به‌صورت دستی
var float ad = na
ad := na(ad[1]) ? 0 : ad[1] + ((close - low) - (high - close)) / (high - low) * volume

// محاسبه CMF (Chaikin Money Flow)
moneyFlowMultiplier = ((close - low) - (high - close)) / (high - low)
moneyFlowVolume = moneyFlowMultiplier * volume
cmf = ta.sma(moneyFlowVolume, lengthCMF) / ta.sma(volume, lengthCMF)

// محاسبه MFI به‌صورت دستی
typicalPrice = (high + low + close) / 3
moneyFlow = typicalPrice * volume

// محاسبه جریان پول مثبت و منفی
positiveFlow = 0.0
negativeFlow = 0.0

for i = 0 to lengthMFI - 1
    positiveFlow := positiveFlow + (close[i] > close[i + 1] ? moneyFlow[i] : 0)
    negativeFlow := negativeFlow + (close[i] < close[i + 1] ? moneyFlow[i] : 0)

mfi = 100 - (100 / (1 + (positiveFlow / negativeFlow)))

// محاسبه VWAP
vwap = ta.vwap(close)

// محاسبه Volume Oscillator
fastVolMA = ta.sma(volume, fastLength)
slowVolMA = ta.sma(volume, slowLength)
volumeOscillator = fastVolMA - slowVolMA

// محاسبه VRSI (Volume RSI)
vrsi = ta.rsi(volume, lengthRSI)

// شمارش اندیکاتورهای سیگنال خرید
buySignals = 0
buySignals := buySignals + (obv > obv[1] ? 1 : 0)
buySignals := buySignals + (ad > ad[1] ? 1 : 0)
buySignals := buySignals + (cmf > 0 ? 1 : 0)
buySignals := buySignals + (mfi < 40 ? 1 : 0)
buySignals := buySignals + (close < vwap ? 1 : 0)
buySignals := buySignals + (volumeOscillator > 0 ? 1 : 0)
buySignals := buySignals + (vrsi < 40 ? 1 : 0)

// شمارش اندیکاتورهای سیگنال فروش
sellSignals = 0
sellSignals := sellSignals + (obv < obv[1] ? 1 : 0)
sellSignals := sellSignals + (ad < ad[1] ? 1 : 0)
sellSignals := sellSignals + (cmf < 0 ? 1 : 0)
sellSignals := sellSignals + (mfi > 60 ? 1 : 0)
sellSignals := sellSignals + (close > vwap ? 1 : 0)
sellSignals := sellSignals + (volumeOscillator < 0 ? 1 : 0)
sellSignals := sellSignals + (vrsi > 60 ? 1 : 0)

// شرایط سیگنال خرید: اگر بیش از 4 اندیکاتور سیگنال خرید دهند
buyCondition = (buySignals > 4)

// شرایط سیگنال فروش: اگر بیش از 4 اندیکاتور سیگنال فروش دهند
sellCondition = (sellSignals > 4)

// ورود به معامله خرید
if (buyCondition)
    strategy.entry("Buy", strategy.long)

// خروج از معامله فروش
if (sellCondition)
    strategy.close("Buy")

// رسم سیگنال‌های خرید و فروش بر روی چارت
plotshape(buyCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sellCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")

Published by ChaoZhang on the FMZ strategy square · last modified 2024-11-12. 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.

in Claude Code, Cursor, Codex & 4 more
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/Multi-Volume-Momentum-Combined-Trading-Strategy.md
  1. npx agenkit install engineering-kit in your project
  2. Paste the command into your agent and approve each phase
  3. 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

esc

Try , , or .

↑↓ move↵ open