The Close function in ProBuilder language is used to retrieve the closing price of a trading bar. This function can access the closing price of the current bar or any specified previous bar, making it a fundamental tool for analyzing price data in trading strategies.
Close[N]
Where N is the index of the bar relative to the current bar. N can be 0 (the current bar), a positive integer (N bars back).
Close[0]
or simply
Close
Close[20]
This function is essential for technical analysis in trading systems, where the closing price often plays a critical role in decision-making processes. For example, comparing the closing prices of different bars can help identify trends or patterns in market behavior.
Note: It is important to ensure that the index N does not exceed the number of available bars in the historical data, as this will result in an error.