TotalPrice

Category: Constants

TotalPrice is a function in ProBuilder language that calculates the average price of a candlestick based on its Open, High, Low, and Close values. This function is particularly useful for traders and analysts who want to smooth out the price data and reduce the effects of volatility or minor price fluctuations within a given period.

Syntax:

TotalPrice[N]

Where N represents the index of the candlestick from the current candlestick. N can be any integer where N=0 refers to the current candlestick, N=1 refers to the previous candlestick, and so on.

Example:

averagePrice = TotalPrice[1]

This example assigns the average price of the previous candlestick to the variable averagePrice. The average is calculated as the mean of the Open, High, Low, and Close values of that candlestick.

  • The function simplifies the process of obtaining a representative price of a candlestick, which can be beneficial for various trading strategies and technical analysis.
  • It is important to note that the index N should be within the range of available data to avoid errors.

Understanding the TotalPrice function can help in creating more robust trading indicators and strategies by providing a smoothed price input, which is less susceptible to outliers or extreme values within individual candlesticks.

Logo Logo
Loading...