We write the Goods Market equilibrium as ( IS Equation): I (r)+G+X = S (y) + T + Z
Where I = investment, G= exogeneous Govt Expenditure, X= exports, S=Savings, T=Taxes and Z= Imports.
As par as I,G,S,T we has a detailed discussion but regarding X & Z we should know:
Exports depend on the real exchange rate = ep*/p i.e., X = f (ep*/p)
P= domestic price level and p*= foreign price level.
Imports are a function of real income and the real exchange rate, so that
Z = f (Y, ep*/p)
BOP Equilinrium itself occurs when the net surplus on the current and capital accounts sum to zero. i.e., X-Z+K =O, K = Net inflow of capital.