To make macros, hit the O button and you should find macro options in there. You can have macros with up to 3 lines of commands. Usually I do something like this:
/usability <the exact name of some spell with capitalization, punctuation, and spacing>
/gs <some message to my group>
I don't know if there are commands to open and close hotbars, but one thing you could try are the /loadhotkeys and /savehotkeys commands. They will let you load and save your current hotkey settings and name them. So, you could configure your hotbar the way you want for adventuring and do '/savehotkeys adventuring' and then do the same for tradeskilling and run '/savehotkeys tradeskill'. Then you could make 2 macros:
Macro 1:
/loadhotkeys adventuring
Macro 2:
/loadhotkeys tradeskill
Then you could use these macros to swap our your buttons. It wouldn't open or close any hotbars, but it would change the configuration of your current hot bars. One thing you would have to remember is that anytime you wanted to add or remove buttons from your saved hotkeys you would have to rerun the appropriate /savehotkeys command.
This page has a detailed discussion of macroing in eq2, so you might be able to find additional commands/ideas there.
Good luck!