Yes, Martingale option works in a global way. It looks at the last trade to decide what will be the next lot size, but the type (buy or sell) doesn't matter. What matters is the Group number, so if you want to separate buys from sells, create them with different group numbers.
And by the way, even I don't know what is the right behavior when Martingale is used for pending orders. A true Martingale is when you create a trade, wait for it to close, then create new one, wait for it to close... and so on. But people decided that Martingale should happen in some way for currently running trades. So I added the ability to check currently running trades first (to get the lot size of the latest running trade instead of the latest closed trade). Then people decided that Martingale should happen in some way for pending orders, which is kinda ridiculous. So I added this MM for pending orders, but to be honest I forgot how Martingale works for them.