Violation of the efficient market hypothesis (EMH) in a specific market may lead to construction of bubbles which is a signal of inefficiencies. Although speculative bubbles soon decay, if they exist for a long time, they will lead to financial crises. Early warning systems (EWSs) are designed to quickly alert the market to crises. Under EMH, the logarithm of price is a martingale process. Thus, it is necessary to use a suitable EWS tool for violation of martingale properties of the logarithm of asset prices. In this paper, using the auto-regressive (ARTA) models, and assuming Markov structure between financial random variables, the conditional means are formulated as a simple regression. Then, using the recursive formula for least square estimates of regression parameters, the hypothesis of variables being martingale is tested. This approach leads to a probability index which serves as an EWS. Then, throughout two real data sets, it is seen that the results of the study are applicable to construct EWS for detecting stock market crashes as well as exchange rate market crises. A discussion section is proposed. Finally, based on these results, conclusions are given.