Perhaps I could use separate OptimalF factors for long and short, but limit them with the strategy's overall OptimalF value. Like this:
//reinvest a portion of profits
int reinvestprofits = 1; //invoke margin setting during trade logic
Capital = 1000; //simulate starting account with $1000
var MarginLong = OptimalF * OptimalFLong * Capital * sqrt(1 + (WinLong-LossLong)/Capital);
var MarginShort = OptimalF * OptimalFShort * Capital * sqrt(1 + (WinShort-LossShort)/Capital);
I'd like to be able to use separate figures because in some cases one of the components is really bad, as seen in this example.