The WeightedClose function in ProBuilder language calculates a modified closing price of a stock or security that gives more importance to the closing price while also considering the high and low prices of the day. This indicator is used to provide a more comprehensive view of the day’s price movement compared to a simple closing price.
WeightedClose[N]
Where N represents the number of periods before the current one. For example, WeightedClose[1] refers to the weighted close of the previous candle.
The Weighted Close is calculated using the formula:
(2 * Close + High + Low) / 4
This formula averages the values by giving double weight to the closing price and single weight to both the high and low prices of the period.
To calculate the Weighted Close of the previous candle in a trading script, you can use the following code:
myWeightedClose = WeightedClose[1]
This line of code assigns the weighted close value of the previous candle to the variable myWeightedClose.
Understanding and utilizing the Weighted Close can enhance the analysis of price patterns and trends, aiding in more effective trading strategies.