Code for Expert Advisor

I WANT Code for a strategy for generating buy and sell signal…
For Buy-
1 Macd Crossover
2 ADX > 20 and +Di Crossover to -Di
3 Ema of 9 Crossover to EMa 21

And Reverse for Sell signal…

you can check the similar tradescript code available in expert advisor page from this link