In this paper we present a model to predict the stock trend based on a combination of sequential chart pattern, K-means and AprioriAll algorithm. The stock price sequence is truncated to charts by sliding window, then the charts are clustered by K-means algorithm to form chart patterns. Therefore, the chart sequences are converted to chart pattern sequences, and frequent patterns in the sequences can be extracted by AprioriAll algorithm. The existence of frequent patterns implies that some specific market behaviors often appear accompanied, thus the corresponding trend can be predicted. Experiment results show that the proposed system can produce better index return with fewer trades. Its annualized return is also better than award winning mutual funds. Therefore, the proposed method makes profits on the real market, even in a long-term usage.