But I posted some example above to calculate this max profit. The EA doesn't collect such profits otherwise. I have 2 variables - maxProfit and maxLoss - and they collect the maximum profit and loss as a money amount. The problem is that those are only 2 variables and it will not work if you want to collect the profits from multiple trades at the same time. To do this, arrays of data will need to be used. But if you have only 1 trade at a time, those 2 variables will work good.