Pass a variable to a recursive function?

I am trying to modify the following recursive function.

EX[n_] := EX[n] = EX[n - 1]*x^n
EX[1] := x

This code works and provides output such as.

In[194]:= EX[7]

Out[194]= x^28

What I would like is a function that looks like this.

EX[x_,n_] := EX[x,n] = EX[n - 1]*x^n
EX[1] := x

So that;

EX[y,15]

results in,

 y^15

Obviously, the code above does not work. Any help is greatly appreciated.

You got it almost right:

EX[x_, n_Integer] := EX[x, n] = EX[x, n - 1]*x^n
EX[x_, 1] := x

If you have version 11.3 you can use the new Curry to play around with the order of variables:

Curry[EX][15][x]