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

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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?