all legal of course! But if i bought and sold between 2 accounts, I would get a call from my broker and have the trade cancelled