LogoLogo
  • Welcome to AMP Futures (USA) Help
  • Trading Platforms
    • Quantower
      • Shortcuts
        • Overview
      • Getting Started
        • What's new
        • Installation
        • First start
        • Add Exchanges-Symbols
          • Add New Micro Crude Oil (CME) Symbol - MCLE
        • Platform update
        • Backup & restore manager
        • Reset settings to default
        • You have found a bug. What’s next?
      • General Settings
        • Main Toolbar
        • Workspaces
        • Single Panel
        • Link panels
        • Binds
        • Group of panels
        • Templates
        • Set as Default
        • Symbols lookup
        • Table management
        • Setup Actions & Advanced filters
        • Alerts
        • General settings
      • Data-Feed Connections
        • Connection to CQG (AMP Futures)
          • Errors with CQG
      • Analytics Panels
        • Chart
          • Chart Overview
          • Chart Types
            • Tick chart
            • Time aggregation
            • Renko
            • Heiken Ashi
            • Kagi
            • Points & Figures
            • Range bars
            • Line break
            • Volume Bars
            • Reversal Bars
          • Chart Settings
          • Chart Trading
          • Chart overlays
          • Technical indicators
            • Channels
              • Donchian Channel
              • High Low Indicator
              • Round Numbers
              • Highest High
              • Lowest Low
              • Bollinger Bands
              • Bollinger Bands Flat
              • Price Channel
              • Keltner Channel
              • Moving Average Envelope
            • Moving averages
              • Exponential Moving Average
              • FYL Indicator
              • Linearly Weighted Moving Average
              • McGinley Dynamic Indicator
              • Modified Moving Average Indicator
              • Pivot Point Moving Average Indicator
              • Regression Line Indicator
              • Simple Moving Average Indicator
              • Smoothed Moving Average Indicator
              • Guppy Multiple Moving Average Indicator
              • Trend Breakout System Indicator
              • Triple Exponential Moving Average Indicator
            • Oscillators
              • Aroon Indicator
              • Moving Average Convergence/Divergence
              • Awesome Oscillator
              • Accelerator Oscillator
              • %R Larry Williams
              • Momentum
              • Rate of Change
              • Relative Strength Index (RSI) Indicator
              • Commodity Channel Index
            • Trend
              • Average Directional Movement Index (ADX) Indicator
              • Ichimoku Cloud Indicator
              • Directional Movement Index (DMI) Indicator
              • ZigZag
            • Volatility
              • Average True Range
              • Standard deviation
            • Volume
              • Delta Flow
              • Delta Rotation
              • Level2 indicator
          • Drawing Tools
          • Volume Analysis Tools | Volume Profiles | Footprint chart | VWAP
            • Cluster chart
            • Volume profiles
            • Time statistics
            • Time histogram
            • Historical Time & Sales
          • OHLC
          • Power Trades
          • VWAP | Volume Weighted Average Price
          • Anchored VWAP
        • Watchlist
        • Time & Sales
        • Price Statistic
        • DOM Surface
        • Option Analytics
        • TPO Profile Chart
      • Trading Panels
        • Multiple Order Entry
        • Order Entry
          • Algo Order Types
          • OCO (Multi-Level)
          • OCO (Post Fill)
          • Order Types
        • DOM Trader
          • How to setup DOM for Scalping
        • Market depth
        • Trading simulator
        • Market Replay
      • Portfolio Panels
        • Positions
        • Working Orders
        • Trades
        • Orders History
        • Synthetic Symbols
        • Historical Symbols
      • Information Panels
        • Account info
        • Symbol Info
        • Event Log
        • RSS
        • Reports
      • Miscellaneous
        • Symbol Mapping Manager
        • Live Support
        • Market Heat map
        • Stat matrix
        • Exchange times
        • Quote Board
        • Browser
        • Excel and RTD function
          • Changing RTD Throttle Interval in Excel
        • Quantower Telegram Bot
      • Quantower Algo
        • Introduction
        • Install for Visual Studio
        • Strategy runner
        • Simple Indicator
        • Simple strategy
        • Input Parameters
        • Built-In indicators access
        • Custom indicators access
        • Level2 data
        • Access Volume analysis data from indicators
        • Indicator with custom painting (GDI)
        • Access Chart from indicator
        • Using markers with indicators
        • Using Clouds in Indicator
        • Adding a custom indicator to Watchlist
        • Downloading history
        • Access to trading portfolio
        • Trading operations
        • Example: Simple Moving Average
        • Access to advanced aggregations
        • Access to symbol/account additional fields
      • Customization
        • Localization
      • FAQ
        • General Errors
Powered by GitBook
On this page

Was this helpful?

  1. Trading Platforms
  2. Quantower
  3. Quantower Algo

Access Volume analysis data from indicators

Use advanced Volume Analysis technique in your indicators

PreviousLevel2 dataNextIndicator with custom painting (GDI)

Last updated 4 years ago

Was this helpful?

Quantower trading platform has a wide set of , an advanced analytical functionality, which allows you to see the traded volume at each price level, assess the balance between buyers and sellers and understand the intentions of traders regarding the future price.

You can easily access all volume analysis data from your indicator. By default charts does not loading such data, as it requires time to get full trades history. You need to notify chart, that your indicator need it for calculations and you can do this by implementing a special Interface IVolumeAnalysisIndicator:

public class IndicatorVolumeAnalysis : Indicator, IVolumeAnalysisIndicator{           ...

It contains only one method VolumeAnalysisData_Loaded and it will be called, when all required data finish loading:

public void VolumeAnalysisData_Loaded(){}

If you need to know current state of loading, you may use VolumeAnalysisCalculationProgress from HistoricalData. If loading was started, this object will be set and you may know current state or even percent of loaded data:

if (HistoricalData.VolumeAnalysisCalculationProgress.State != VolumeAnalysisCalculationState.Finished    Core.Instance.Loggers.Log(HistoricalData.VolumeAnalysisCalculationProgress.ProgressPercent.ToString());

When loading is finished Total object will be available for each HistoryItem from HistoricalData which provide access to aggregated volume analysis data:

HistoricalData[0].VolumeAnalysisData.Total.VolumeHistoricalData[0].VolumeAnalysisData.Total.TradesHistoricalData[0].VolumeAnalysisData.Total.AverageBuySize 

List of all available data types:

Data type

Description

Volume

The total size of all positions that executed at each price level or price range

BuyVolume

The total size of all Buy positions that executed at each price level or price range

SellVolume

The total size of all Sell positions that executed at each price level or price range

Trades

The number of contracts (trades) that executed at each price level.

BuyTrades

The number of Buy trades that executed at each price level

SellTrades

The number of Sell trades that executed at each price level

BuyVolumePercent

Shows how many percent of the total volume relates to Buy trades

SellVolumePercent

Shows how many percent of the total volume relates to Sell trades

Delta

Shows the difference in traded Volume between Buyers and Sellers. It allows evaluating who controls the price on the market at a given time

DeltaPercent

Shows the difference (%) in traded Volume between Buyers and Sellers. It allows evaluating who controls the price on the market at a given time

AverageSize

The average volume of the position that was executed at a certain price or price range

AverageBuySize

The average volume of a Buy position that was executed at a specific price or price range

AverageSellSize

The average volume of a Sell position that was executed at a specific price or price range

MaxOneTradeVolume

Shows the maximum volume of a single trade that has executed at a certain price or price range

MaxOneTradeVolumePercent

Shows the maximum (%) volume of a single trade that has executed at a certain price or price range

Except Total (aggregated) information you have access to Volume analysis data for each price from the bar. It is available in PriceLevels dictionary and contains same data types as Total:

this.HistoricalData[0].VolumeAnalysisData.PriceLevels[1.2564].Volume

As an example let's create a simple indicator, that will draw 2 lines in the separate window of the chart. First one will show AverageBuySize and second AverageSellSize. This is full source code:

using System;using System.Drawing;using TradingPlatform.BusinessLayer;using TradingPlatform.BusinessLayer.Modules.Indicators;​namespace IndicatorVolumeAnalysis{   	public class IndicatorVolumeAnalysis : Indicator, IVolumeAnalysisIndicator    {        public IndicatorVolumeAnalysis()            : base()        {            Name = "IndicatorVolumeAnalysis";            Description = "My indicator's annotation";​            AddLineSeries("AverageBuySize", Color.CadetBlue, 1, LineStyle.Solid);            AddLineSeries("AverageSellSize", Color.Red, 1, LineStyle.Solid);​            SeparateWindow = true;        }​        public void VolumeAnalysisData_Loaded()        {            for (int i = 0; i < this.Count; i++)            {                SetValue(this.HistoricalData[i].VolumeAnalysisData.Total.AverageBuySize, 0, i);                SetValue(this.HistoricalData[i].VolumeAnalysisData.Total.AverageSellSize, 1, i);            }        }        protected override void OnUpdate(UpdateArgs args)        {                        if (this.HistoricalData.VolumeAnalysisCalculationProgress == null || this.HistoricalData.VolumeAnalysisCalculationProgress.State != VolumeAnalysisCalculationState.Finished)                return;​            SetValue(this.HistoricalData[0].VolumeAnalysisData.Total.AverageBuySize, 0);            SetValue(this.HistoricalData[0].VolumeAnalysisData.Total.AverageSellSize, 1);                    }                   }}

When we build this indicator and add on the chart we can see next result:

In this topic, we showed you the simple example of indicator based on volume analysis data. You may improve it and create really advanced and complex indicator, similar to Volume Analysis tools from Quantower, for example Cluster Chart. In our next topics we will provide an example of drawing volume profiles on the chart.

Indicator lines show average buy size and average sell size
Volume analysis tools