Hi J¨¹rgen I just saw your reply.
So in terms of my earlier code, I can just use that and set the ocatype method for the trailing stop and exit orders and I should be able to meet all my 3 requirements ?