Credit for some of the code must go to a one-line space trader game i found on a zx-spectrum website, thank you to who ever the author is.

The trading screen, there are four commodities to trade and four moons to trade between. Trading is done by selecting the commodity and how much you wish to purchase ( a negative value is used to sell items of cargo)
Set course for another moon by selecting its number and then selecting it again to confirm the destination.

The space flight screen, survive the pirate attack (destroy them if you can for bonus credits) and you will automatically dock at the colony. Credits will be automatically deducted for your stay at the colony, to recharge your shields (show at the top left of the flight screen) and refuel your ship.
Game controls:- steer your ship with Q,A,O,P and use the space bar to fire at the pirates.
Good Luck, Space Trader