I recently set up a trailing stop sell order for an illiquid security that was triggered by the bid price going above a certain threshold. My rationale to trigger on the bid price was an attempt to minimize the effects of the magnitude of the bid-ask spread. When later on I saw that the security price had briefly gone above the limit I had set, the only question in my mind was at which price my sell order was executed. However, to my suprise I saw that my order not only had not been filled, but, even more puzzlingly, had not even been triggered.
I believe this unexpected outcome underlines an essential misunderstanding that I have of the concept of bid and ask prices, but all the further reading I have done on the subject has not helped me to fully understand exactly what happened . In my mind, I have always assumed that for a transaction to happen, the bid must equal the ask. More precisely, my assumption has always been that when a transaction happens at time t, at that precise instant of time necessarily
bid price(t)=ask price(t)=mark price (t)=last price(t).
However short the time interval during which this equality holds (possibly just fractions of a millisecond), the fact that these four prices become instantaneously equal when a transaction takes place should trigger a conditional order with a limit below the transaction price, no matter on which of the four prices the trigger is set.
I would really appreciate any help in understanding where the flaw in my assumptions is.