Thanks a lot jcl! This makes sense to me.

From your experience, what is the best way to achieve this?

Would you do something like this?

Margin = .5*OptimalF*Balance/NumOpenTotal;

In other words decreasing your trade size based on how many trades are open.

Or would it be better to limit the total trade number to rather than reducing risk per trade?

Cheers