In this paper a financial market model with heterogeneous adaptively learning agents is developed. The agents can choose between a fundamental forecasting rule and a technical trading rule. The fundamental forecasting rule predicts that the price returns back to the fundamental value with a certain speed, whereas the technical trading rule is based on moving averages. The model in this paper extends the Brock and Hommes (1998) heterogeneous agents model by adding a moving-average technical trading strategy to the set of beliefs the agents can choose from, but deviates by assuming constant relative risk aversion, so that agents choosing the same forecasting rule invest the same fraction of their wealth in the risky asset. The local dynamical behavior of the model around the fundamental steady state is studied by varying the values of the model parameters. A mixture of theoretical and numerical methods is used to analyze the dynamics. In particular we show that the fundamental steady state may become unstable due to a Hopf bifurcation. The interaction between fundamentalists and technical traders may thus cause prices to deviate from their fundamental value. In this heterogeneous world the fundamental traders are not able to drive the moving average traders out of the market, but fundamentalists and technical analysts coexist forever with the irrelative importance changing over time.