DataProfile ( double value area percent);

Default values:

value area percent: 70.0


The DataProfile function plots an activity profile for any given input variable such as study or function. The activity profile is essentially a horizontal diagram that gives insight into which values are most often reached by the input variable.

The histogram is calculated based on the following algorithm:

  1. The system finds the value range of the variable.
  2. This value range is broken into intervals. This process can be automatic (the range is broken into 85 equal parts), ticksize-based (each interval's length is equal to the minimum value movement), and manual (interval length is specified by user). The interval length defines the height of each histogram row.
  3. The system calculates the number of times the variable value has reached each of the intervals.
  4. Each histogram row then has a length proportional to the corresponding number calculated in Step 3. 

Here is how you can read the DataProfile histogram:

  • The longest row represents the value most often reached by the input variable. It is also called Point Of Control.
  • The range surrounding the Point Of Control where 70% of the value movements took place is called Value Area and represents frequent values. The mentioned percentage is the default and can be modified using input parameters.

Input Parameters


Default value


data - The variable to calculate the Data Profile for.
pricePerRow PricePerRow.AUTOMATIC The row height. This value can be calculated automatically (use the PricePerRow.AUTOMATIC constant to break the entire range into 85 equal parts), ticksize-based (use the PricePerRow.TICKSIZE constant to break the range into intervals, each having a length equal to minimum value movement), or manually (specify the desirable interval length).
startNewProfile - Defines a condition, which, when satisfied, gives the function a signal to calculate a new profile.
onExpansion Yes Defines whether or not to show the profile on the expansion area of the chart.
numberOfProfiles "all" 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.
value area percent 70.0 Defines the percentage of frequent value movements to be included in the Value Area.


declare lower;

def rsi = reference RSI();
def condition = GetYear() != GetYear()[1];

profile CustomProfile = DataProfile(data = rsi, onExpansion = no, startNewProfile = condition);

plot POC = CustomProfile.GetPointOfControl();

The above code displays yearly data profiles of RSI and their Points Of Control as a plot.