Under a fix, this logic is reversed. Home monetary authorities pick the exchange rate E. In the long run, the choice of E determines the price level P via PPP, and also the interest rate i via UIP; these, in turn, determine the necessary level of the money supply M. The exchange rate is an input in the model (an exogenous variable), and the money supply is an output of the model (an endogenous variable).