Leverage is read-only, except for leverage-based accounts. For simulating a leverage based account, edit the asset list, set leverage to the desired leverage and set MarginCost to 0.