Question re trailing stops

I have some questions regarding trailing stops.

Say I go long a trade, and I set a 30 pip stop loss and a 20 pip trailing stop.

Now if as soon as I go long the price drops like a rock, then when the price reaches -30 my stop loss will trigger and I get stopped out. I get that.

If the price goes up by 20 pips, then my trailing stop gets activated, and I should get “locked in” at break even, right?

Now say the price goes up another 20 pips, to +40. My trailing stop will move up to +20, yeah?

But then the price drops down by 10 pips, to +30, and stays there for a few candles. Does my trailing stop STAY at +20, or does it ever drop down to +10?

If you’re long, a trailing stop will always move upward and never downward. If you’re short, a trailing stop will always move downward and never upward. If it did not behave that way then your stop would never get hit unless price gapped or the market experienced heavy volatility with price moving too rapidly for the stop to be able to react. In those circumstances you would continue to drawdown your account until you receive a margin call or the broker closes the trade when you finally blow your account.