Help with Average calculation

Forums ProRealTime English forum ProBuilder support Help with Average calculation

Viewing 4 posts - 1 through 4 (of 4 total)
  • #45726

    Hello,
    I have following code snippet:

    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.

    Best regards
    Ekki

    #45728

    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:

    This will for example give you the 20-period simple moving average of the closing price.

    #45730

    Maybe you want to calculate an average on a price, such as close, +- n Pips.

    I think you may try

     

     

    #45734

    Thanks Despair,

    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.

     

     

Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login