I am writing a formula where I need to calculate yesterday's price change (in percentage). Could anyone guide me how to write the AFL. The formula would be as below:
Yesterday's Price Change = (Yesterday Close Price - Yesterday Open Price) / Yesterday Open Price * 100
@sandeeppanja, you can easily translate your pseudo code to AFL using the Ref() function to get the "yesterday" Close and Open prices.
Your formula, applied to the Close and Open time series, will return an array. If for any reason, you only need the last value of such array use the LastValue() function.