MidBodyVal

MidBodyVal ();

Description

Returns the price corresponding to the middle of the candelstick body. This price can be calculated as (open + close)/2.

Sample

Example

plot CandleBodyTop = MidBodyVal() + 0.5 * BodyHeight();
plot CandleBodyBottom = MidBodyVal() - 0.5 * BodyHeight();

This script plots two lines: the first one connecting all the candle body tops and the second one connecting all the candle body bottoms.