Category: Indicator > Miscellaneous
The Weighted Close for each bar is calculated as an average of the high, low and close, with the close getting twice the weight of the high and low. This value is then plotted on the chart. An average of the Weighted Close from the most recent number of bars specified by the input Length is also plotted. Using the Weighted Close instead of the close in calculating and plotting, say, a moving average weighs the high and low into the calculation.
This indicator can be used in a manner similar to the Mov Avg 2 Lines, with attention given to the direction and relative position of prices, Weighted Close and the average of the Weighted Close.
Length - Number of bars of data to be included in calculation of the average of Weighted Close
PLOT1(WEIGHTEDCLOSE, "WEIGHTCLOSE" );
PLOT2(AVERAGEFC(WEIGHTEDCLOSE, LENGTH), "AVERAGE");
IF PLOT1 CROSSES OVER PLOT2 THEN
ALERT("THE WEIGHTED CLOSE HAS CROSSED OVER ITS AVERAGE")
IF PLOT1 CROSSES UNDER PLOT2 THEN
ALERT("THE WEIGHTED CLOSE HAS CROSSED UNDER ITS AVERAGE");