VolumeProfile ( String symbol , double pricePerRow , IDataHolder startNewProfile , int onExpansion , int numberOfProfiles , double value area percent );    
Default values:
symbol: getSymbol()
            pricePerRow: PricePerRow.AUTOMATIC
            onExpansion: Yes
            numberOfProfiles: "all"
            value area percent: 70.0
    
    
Description
Displays the volume profile with user-defined calculation parameters.
The symbol parameter defines a symbol to calculate the volume profile for.
The pricePerRow parameter defines the "height" (price range) of each row of the profile. This value can be defined by an actual price range or a PricePerRow constant.
The startNewProfile parameter defines a condition; when it is true, the function is given a trigger signal to calculate the new volume profile.
The onExpansion parameter defines whether or not the profile is shown on the expansion area of the chart.
The numberOfProfiles parameter defines the number of profiles to be displayed if onExpansion is set to no. If onExpansion is set to yes then this parameter is ignored and only one profile is shown.
The value area percent parameter sets the percentage of the trading activity for which the Value Area is determined.
Input parameters
| Parameter | Default value | Description | 
|---|---|---|
| symbol | current symbol | Defines symbol to calculate the volume profile for. | 
| pricePerRow | PricePerRow.AUTOMATIC | Defines the "height" (price range) of each row of the profile. This value can be defined by an actual price range or a PricePerRow constant. | 
| startNewProfile | - | Defines condition: when it is true, the function is given a trigger signal to calculate the new profile. | 
| onExpansion | Yes | Defines whether or not to show the profile on expansion area of the chart. | 
| numberOfProfiles | "all" | Defines the number of profiles to be displayed if onExpansionis set tono. IfonExpansionis set toyesthen this parameter is ignored and only one profile is shown. | 
| value area percent | 70.0 | Defines the percentage of the trading activity for which the Value Area is determined. | 
Example
def allchart = 0;
profile vol = VolumeProfile("startnewprofile"=allchart);
vol.Show("color"=Color.YELLOW);
This script plots Volume profile study (colored yellow) that aggregates all chart data on the right expansion.