Help for Code Generation in pi

I want to generate code in pi —> If 13 days only close EMA is Greater than todays High = BUY Signal in pi

As per the above condition

Buy Script:

EMA(CLOSE,13)>HIGH

Use daily charts as per above condition.