x is a variable which I set before, however, x is not relevant for my question.
Actually, the formula was a typo when I first entered it, because according to the documentation I should have specified the range for which the Average has to be computed in brackets, like “Average[range]”.
However the formula works without error but I don’t know exactly what Average is being computed.
So, which average is the formula referring to without the brackets? Is it the average of all available data?
I would be very happy if somebody could answer my question.
This is a quite unusual way to use average command and I have a hard time seeing what you want to achieve. Maybe it is easier for you describe it in german in the german forum?
The usual syntax is:
1
c=Average[20](close)
This will for example give you the 20-period simple moving average of the closing price.
like I wrote in my post, the formula like I entered it was a typo, because I omitted the brackets by mistake. It was not purposely an unusual way to use it.
However, in the meantime I found out that the Average function defaults to a period of 20. So Average(…) gives the same result as Average[20](…), which answers my question.
Thank you Roberto, I understand the Average function and I know how to use it – maybe my question wasn’t very clear on that.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue