Syntax
public static void PriceVolumeHeatMap(this WealthScript obj, int lookback, int binCount)
public static void PriceVolumeHeatMapAtBar(this WealthScript obj, int currentBar, int lookback, int binCount)
public void PriceVolumeHeatMap(int lookback, int binCount)
public void PriceVolumeHeatMapAtBar(int currentBar, int lookback, int binCount)
Parameter Description
Lookback | Number of bars used in the distribution |
binCount | Number of bins |
currentBar | Current bar |
Description
Credit for Price/Volume Heat Map goes to
Andrew Vishnyakov (avishn).
The concept is very simple -
- take price and volume information over lookback period (such as last 40 bars)
- split price range into a number of "bins"
- calculate EMA of volume for each bin over the lookback period
- calculate standard deviation for all bins at the given bar
- plot it on the chart using yellow for volume values within standard deviation range and red for volume above standard deviation
It seems to help in identifying congestion areas as well as "resistance becoming support" scenarios.
Example
Example using C# extension methods:
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
namespace WealthLab.Strategies
{
public class MyStrategy : WealthScript
{
protected override void Execute()
{
this.PriceVolumeHeatMap(40, 40);
}
}
}
Legacy syntax example:
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using Community.Components; /*** Requires installation of Community.Components Extension from www.wealth-lab.com > Extensions ***/
namespace WealthLab.Strategies
{
public class MyStrategy : WealthScript
{
protected override void Execute()
{
Calculate c = new Calculate( this );
c.PriceVolumeHeatMap(40, 40);
}
}
}
Here is a sample output:
Price/Volume Heat Map |