Pls correct my code

Hello, I want to use a variable (A) as no. of periods. 

SET A = 13

CLOSE > EMA(CLOSE,A)

This does not work.

Could you please suggest how to use a variable for No. of periods?

As per the above 

CLOSE>EMA(CLOSE,13)

Sir, I donot want to write a numerical value in Periods argument, but a Variable calculated by another expression…
For example,
Set A = lastif(crossover(ema(close,13),(ema(close,39)))
close < llv(A)
Please suggest