We consider a model in which foreign and domestic traders buy the assets of both of two countries. Speculators in both countries use chartist or fundamentalist rules for forecasting the exchange rate. Demand for the assets of each country is determined by these forecasts. Perceptions of the fundamentals in each country are not necessarily the same. Rules are used with a certain probability depending on an agent's previous experience with them. The demands of the fundamentalist and chartist agents in the two countries determine the temporary equilibrium exchange rate at each point in time. This is unique under certain assumptions. With traders of both nationalities there is no need, as in other models, for an exogenous supply of foreign exchange. The model produces realistic features of the equilibrium exchange rate series. Periods in which the exchange rate tracks the fundamentals of one of the countries alternate with others in which bubbles appear.