Thanks again, Andrew.
I'm probably doing something wrong but it seems to only make things worse when I try and add this type of trade management into the mix.
I added your code to create the var, then the below:
for(open_trades)
if(vPercentMAE > 1.0)
exitTrade(ThisTrade);
Even optimising this parameter does not help.
In any case, this is certainly very good to know and I will certainly use this (i.e. the MAE graph) in future development.