Code for scanning stocks

sir,

requirement of code:

code 1:

EMA 8 above EMA 13 for aspecific period (say for last 30 candle sticks) in uptrend(45 degree slope uptrend)

EMA 8 below EMA 13 in downtrend same above conditions

Normally i use 3mts candle period 2 days , please mention any change in period/days

code 2 :

50% of 10 days average volume < current volume

Idea is to scan stocks satisfying above conditions for intraday trading

As per the above condition

Buy Script:

CROSSOVER(EMA(CLOSE,8),EMA(CLOSE,13)) AND TREND(CLOSE,30) = UP

Sell Script:

CROSSOVER(EMA(CLOSE,13),EMA(CLOSE,8)) AND TREND(CLOSE,30) = DOWN

For your second condition it is not possible to code for scanning 10days based on percentage

Thank you for answer
I want EMA lines EMA 8 and EMA 13 not crossing each other for a specific period

not crossing ? i didnt get u