I've never used a trailing stop order on bitcoinica, but I assume it functions like a normal trailing stop order:
If you make a trailing stop sell order, your order will be executed once the price drops a certain amount, say X, (like a normal stop) but if the price rises first, then the peak of the value rise becomes the new upper limit and if the price falls by that set amount, 'X', from that peak your sell executes.
Its a little confusing on bitcoinica because you set the sell price rather than the price change (which i called X) which i think makes more sense since the sell price will vary if the price rises, but the change in price will remain constant...
For a trailing stop buy: change the word sell to buy, drop to rise, and upper limit to lower limit.

This is how it *should* work, but I tried one once and found that trailing stops do not work as they should on Bitcoinica. Basically, what happened is this:
I had a long at say $4 (that's not where I actually held a long, but we'll just go with that). The price was at $4.50 and I thought, "This would be a good time for a trailing stop." So I set a trailing stop sell at $4.20, thus guaranteeing myself at least a $0.20 profit. Now, if the price were to rise to $5, my trailing stop sell should go up as well -- to $4.667 if it increases by the percentage rise. This is what SHOULD happen, but instead what happened was this.
The price went up a bit, say to $4.55. Then it dropped to $4.45. It did this numerous times over the course of a few hours, and eventually my trailing stop sell executed at $4.47 or something. Basically, last I checked the trailing stops were adjusted every time there was a rise, rather than relative to the highest/lowest price since the time the trailing stop was set. So when you have a trailing stop sell, every time the price increases then the value of your trailing stop sell will go up; likewise, if you have a trailing stop buy, every time the price drops your trailing stop buy value will drop. Given the volatility of Bitcoin and Bitcoinica, the results is that either type of trailing stop order will often execute relatively close to the current market value.
Which, of course, means Zhoutong needs to fix this portion of his code. I'd wager most people never use it, so no one has pointed out the error before. Or maybe he has fixed it in the past ~month as I haven't tried testing it again lately.