The widespread use of location systems such as GPS and RFID along with the massive use of mobile devices have allowed a significant increase in the availability and access to spatio-temporal databases in recent years. This large amount of data has motivated the development of more efficient techniques to process queries about the behavior of moving objects, like discovering behavior patterns among trajectories of moving objects over a continuous period of time. Several studies have focused on the query patterns that capture the behavior of entities in motion, which are reflected in collaborations such as mobile clusters, convoy queries and flock patterns. In this paper, we provided an algorithm to find clustering patterns, traditionally known as flocks, which is based on a frequent pattern mining approach. Twoalternatives for detecting patterns, both online and offline, are presented. Both alternatives were compared with two algorithms of the same type, Basic Flock Evaluation (BFE) and LCMFlock. The performance and behavior was measured in different datasets, both synthetic and real.