We are trying to implement trailing stops for Long and Short orders.

We were doing simple if/else statements to keep track of a the high-water mark (or low water mark in a short), but it seems the correct way would be using the StopMarketOrder() function, and then doing an UpdateOrderFields() as this will be more accurate (and stateless). What confuses me, si that all the documentation around StopMarketOrder() says you set it HIGHER than the current market price, which isn't what we want a trailing stop for (we want it as a way to cap our downside).

Is this correct? Or have I misunderstood the StopMarketOrder() purpose?