HighestWeighted

HighestWeighted ( IDataHolder data, int length, IDataHolder coefficient);

Default values:

length: 14

Description

Returns the highest value of data weighted with the coefficient for the last length bars.

Input parameters

Parameter Default value Description
data - Defines data for which the highest value is found.
length 14 Defines period on which the weighting is applied.
coefficient - Defines the weighting coefficient for data.

Example

declare lower;
input price1 = close;
input price2 = open;
def delta = price2 - price1;

plot HWBuiltin = HighestWeighted(price1, 3, delta);
plot HW = Max(Max(price1, price1[1] + delta), price1[2] + 2 * delta);

This example shows how the HighestWeighted is constructed by taking maximum of several values. The two plots coincide.