AB_Median (Function)

image\trumpet2.gif Disclaimer

The AB_Median function calculates and returns the median value for the ActivityBar cells of the current bar.

Syntax

AB_Median(Side)

Returns (Double)

The median value for ActivityBar cells on the specified Side(s) of the current bar.

Parameters

Name Type Description
Side Numeric Sets the side of the ActivityBar on which the median will be calculated; options are LeftSide, RightSide and 2 for both sides.

Remarks

The median refers to the middle value in the cell distribution, which is between an equal number of values on one or both sides of the ActivityBar. The Side Input determines if the calculation will take place over the whole bar or just on a specific side.

Example

Assigns to Value1 the median price of the cells drawn on both sides of the current bar:

Value1 = AB_Median(2);

Assigns to Value2 the median price of the cells drawn on the left side of the current bar:

Value2 = AB_Median(LeftSide);

See Also

AB_Mode, AB_StdDev