The rational expectations efficient market model of the exchange rate has failed empirically. In this paper we develop a model of the exchange rate in which agents use simple forecasting rules. Based on an ex post evaluation of the relative profitability of these rules they decide whether to switch or not. In addition, transactions costs in the goods market are introduced. We show that this simple model creates great complexity in the market which is characterised by the fact that the exchange rate is disconnected from its fundamental most of the time. Finally we show that this model mimicks most of the empirical puzzles uncovered in the literature.