So, if I haven't got enough margin for outright position of any leg, does it mean I am not able to close the positions (liquidate everything) at all? How do I get out of the market then?
This is VERY FCM dependent. I will steer clients away from discount brokers because their risk systems are simply not set up for spread offset margins - I mean, 99+% of their clients are scalping flat price outrights. I've had clients using famous name discount brokers who margined each correctly hedged spread leg as outright risk which is just a freaking disaster.
If you want to be really safe about it - use the exchange supported spreads and do not manually leg the spreads. Using an autospreader is about the same as manually legging spreads from a risk perspective. If you are leaving legs open for any length of time - minutes or even hours; then your FCM Risk Department is naturally going to margin those legs as outright.
I steer clients towards major Chicago FCMs who have a long list of commercial and spec spread traders as clients. Their Risk Managers know how to set allowances on their systems to accommodate a spread trader. One very famous FCM will give my spread clients 4 times daily buying power for intraday and then for carried positions overnight the SPAN margin offsets get assigned. But don't abuse this trust - otherwise the Risk Manager will throw your ass out on the curb.
When legging spreads, I teach my clients to split the difference. In other words, I will work a bid on one leg and when that bid gets hit I will
immediately hit the bid on the other leg. If you are intent on buying a bid on one leg and selling the offer on the other leg that is a fool's errand that will end up costing you far more than you eked out on the rare times that it worked out for you. If you're going to sit there that long with open legs and take on that kind of risk then yeah, nut up and expect to pay full outright margin on each leg.
But as I mentioned before the
BEST method for both trader and Risk Manager is to use the exchange spreads. And it's perfectly fine to use combinations of exchange spreads - I use exchange calendar pair spreads to construct Butterflies and Condors
all the time. You can leg exchange supported butterflies and condors to construct spreads with several legs. You can buy one exchange strip and sell another exchange strip. You have tens of thousands of possible combinations using exchanges spreads. If you are legging one exchange spread against another the risk profile and margin requirements are completely different as compared to legging one outright against another outright.