Signals Help Center
  • About Signals
  • Getting Started
    • Tutorials
      • Your First Strategy
        • Create a New Strategy
        • Define Variables
        • Define Setup Method
        • Define Register Actions Method
        • Backtest
        • Deploy Strategy & Start Receiving Signals
    • Dashboard
    • Strategies
      • Strategy Tools and Settings
        • Editor
        • Strategy Detail
        • Backtests
          • Backtest Detail
          • Deploying a Backtest
          • Delete a Backtest
        • Deployments
          • Deployment Detail
          • Edit About, Rules & Alternative Markets
          • Undeploy an Active Deployment
          • (Un)Publish a Deployment
          • (Un)Follow a Deployment
          • Delete a Deployment
        • Followings
          • Following Detail
          • Unfollow a Deployment
          • Delete Record of Following
      • Strategies Marketplace
        • Follow a Strategy
        • Publish Strategy
      • Strategy Details
      • Strategy Metrics
        • Initial Capital
        • Initial Capital (USDT)
        • Strategy Balance
        • Strategy Balance (USDT)
        • Total Performance
        • Total Performance (USDT)
      • Strategy Types
        • Single Market Strategy
        • Multi Market Strategy
    • Account
      • Change Plan
      • Change or Reset Password
      • Change Name, Username, or E-mail
  • Framework Documentation
    • Strategy
      • Methods
        • Setup()
          • DataMarketplace
          • IndicatorsMarketplace
        • RegisterActions()
        • Orders Management
          • CancelOrder()
          • CancelAllPendingOrders()
          • EnterLong()
          • EnterLongLimit()
          • EnterShort()
          • EnterLongStop()
          • EnterShortLimit()
          • ExitLong()
          • EnterShortStop()
          • ExitLongLimit()
          • ExitShort()
          • ExitShortLimit()
          • ExitLongStop()
          • ExitShortStop()
        • Risk Management
          • SetProfitTarget()
          • SetStopLoss()
      • Properties
        • Market
        • Markets
        • PendingOrders
        • Position
        • Time
      • Types
        • IOrder
        • PendingOrder
    • Data
    • Logs
  • Knowledge Base
    • Vocabulary
      • Base currency
      • Deployment
      • Following
      • Quote currency
      • Strategy
    • Technical Indicators
      • Oscillators
        • Average Directional Index (ADX)
        • Momentum Indicator (MOM)
        • Moving Average Convergence Divergence (MACD)
        • Relative Strength Index (RSI)
        • Stochastic RSI (STOCH RSI)
      • Volatility
        • Average True Range (ATR)
        • Bollinger Bands (BB)
      • Trend Analysis
        • Exponential Moving Average (EMA)
        • Simple Moving Average (SMA)
        • Volume-weighted Moving Average (VWMA)
        • Weighted Moving Average (WMA)
      • Volume
        • Accumulation/Distribution Line (ADL)
  • Have a question?
    • FAQ
    • Ask on the forums
    • Contact us
Powered by GitBook
On this page
  • Calculation
  • Parameters
  • Examples
  1. Knowledge Base
  2. Technical Indicators
  3. Trend Analysis

Volume-weighted Moving Average (VWMA)

VMWA is a Moving Average indicator which includes data from Volume in its calculation. This indicator places more importance on the closing prices which had a higher volume.

Trading application It is possible to interpret VWMA in a similar manner to other Moving Averages. Its main use, however, arises when it is used in conjunction with a SMA. A WMVA moving below an SMA indicates bearish conditions, while a WMVA moving above an SMA indicates bullish conditions. Seeing a WMVA moving between the price chart and the SMA indicates there will be a trending market. Both lines growing closer together might also suggest an exit point.

Calculation

VWMA(3)=[(P(1)∗V(1)+P(2)∗V(2)+P(3)∗V(3)]/[(V(1)+V(2)+V(3))]VWMA (3) = [(P(1)*V(1)+ P(2)*V(2) + P(3)*V(3)] / [(V(1)+ V(2)+ V(3))]VWMA(3)=[(P(1)∗V(1)+P(2)∗V(2)+P(3)∗V(3)]/[(V(1)+V(2)+V(3))]

P(n): Closing price from n period V(n) = Volume from n period

The above calculation was limited to the 3 most recent periods as a matter of simplicity

Parameters

Input Parameters

Name

Type

Range of value

Description

period

int

<1, int.MaxValue>

Number of bars used in the calculation.

barValue

BarValueType

Output Parameters

Indicator ouptuts a single value.

Type

Range of value

double

(0, double.MaxValue)

Examples

// Prints the current value of a 20 period VWMA using
// the daily bars close price value.
vwma = indicators.VWMA(20, BarValueType.Volume).OnSeries(dailyBars);
Log("The current VWMA value is " + vwma.Value.ToString());

// Prints the previous value of VWMA.
vwma = indicators.VWMA(20, BarValueType.Volume).Keep(2).OnSeries(dailyBars);
Log("The previous VWMA value is " + vwma.Values[1].ToString());

Complete example

using Signals.DataSeries.Bars;
using Signals.Framework;
using Signals.Indicators.VWMA;

public class MyStrategy : SingleMarketStrategy
{
    private Bars dailyBars;
    private VWMA vwma;

    public override void Setup(DataMarketplace data, IndicatorsMarketplace indicators)
    {
        dailyBars = data.Bars(BarPeriodType.Day, 1).WithOffset(25);
        vwma = indicators.VWMA(20, BarValueType.Volume).Keep(2).OnSeries(dailyBars);
    }

    public override void RegisterActions()
    {
        OnUpdateOf(dailyBars).Do(() =>
        {   
            // Prints the current VWMA value
            Log("The current VWMA value is " + vwma.Value.ToString());

            // Prints the previour VWMA value
            Log("The previous VWMA value is " + vwma.Values[1].ToString());
        });
    }
}

PreviousSimple Moving Average (SMA)NextWeighted Moving Average (WMA)

Last updated 5 years ago