Average OrderProfit() over the last 5 tics?

 
HI everyone

I am very new to MQ4 coding, so I would like to ask help with some array stuff.

I would like to calculate the average value of OrderProfit() for the last 5 tics, and think it can be done using arrays, but I don't know how.

Anyone able to help?
 
Make it AccountProfit() instead of OrderProfit(). I think AccountProfit() will be easier to explain, not having to deal with code to identify a trade.