ScrewTurn

Active Trader Strategies API Community ChartStyles Community Commissions Community Components Community Indicators Community Providers Community Visualizers Knowledge Base Misc Optimizers PosSizers Standard Indicators TASC Traders Tips TASCIndicators Tutorial Videos
RSS

Navigation







Quick Search
»
Advanced Search »

PoweredBy

Syntax


public void PriceVolumeDist( int Lookback, System.Color LineColor, System.Color FillColor );

Parameter Description

Lookback Number of bars used in the distribution
LineColor Outline color of the distribution bars. For no outline, pass the same color as FillColor
FillColor Fill color of the distibution bars

Description

A price-volume distribution is the total volume traded in price ranges (or bins) displayed in relative terms as horizontal bars alongside the right chart axis. The price-volume distribution is calculated for the number of bars specified in the Lookback parameter, as described in the example.

Credit for the original WealthScript Code Library Item goes to Robert Sucher and Dion Kurczek: Price Volume Distribution in WL4 Code Library

Example

The following example plots the Price Volume Distribution with blue lines and a light blue background for the most recent 250 bars:


using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using WealthLab.Indicators; 
using Community.Components;

namespace WealthLab.Strategies { public class PriceVolumeDistribution_Test : WealthScript { protected override void Execute() { Calculate c = new Calculate( this ); Color LineColor = Color.Blue; Color FillColor = Color.FromArgb( 30, Color.Blue ); int Lookback = 250; if( Bars.Count < Lookback ) return; c.PriceVolumeDist( Lookback, LineColor, FillColor ); } } }

Here is a sample output:

Price Volume Distribution (Crude Oil continuous contract)

Price Volume Distribution (Crude Oil continuous contract)

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes.

Used under license from FMR Corp. Copyright 2008 FMR Corp. All rights reserved.


ScrewTurn Wiki version 3.0.2.509. Some of the icons created by FamFamFam.