If (!Train) would be better. OptF has no effect on training, though, so it's normally not necessary to disable reinvestment in the training phase.

But the problem is: You're training for the account in AssetsFix.dta. This is normally a FXCM micro account. In your case, when you use the same OptF parameters for both accounts, you're also getting the same margin, but this means a ten times higher lot size on one of the accounts. For preventing this, either use your 0.1 factor for one of the accounts, or generate the OptF parameters for both accounts separately.