Ok,
the above script has the following result:

Max draw-down -1670$ 4% (MAE -13289$ 35%)

The the MAE distribution is attached it seems that few trades generate the issue. What do you recommend?

Attached Files MAE.png