Don't take me for rude, but you say "trailing stop fired ...." and I could also say "trailing stop not fired ...".
There is no indication as to what you are doing, what's happening, if that is actually the right behavior.
Even if what you say would make some sense ... the following is completely wrong:
How can I modify the logic of the bt.Order.StopTrail.
You can also go and try to modify how the markets work. It may be easier and it will probably fit what you have backtested with something you have modified to fit your wishes and not to try to model how things work in the reality.
StopTrail doesn't do what you expect, these are the possible reasons:
You don't know how such an order works in real markets
You do, but it's not the order type which fits what you try to model, but you have still chosen to do it.
Imho: very wrong way to approach your backtesting.