Take-Profit limits are implemented using a type of market order with "range." They are not guaranteed to execute even if the price is crossed.
A sub system monitor price moves. If it detects that the TP price is crossed, it creates a "market with range" order (a market buy with price no worse than the TP price). This range order is sent to matching engine, then system will fill it as much as it can within the range.