Crossover code

Dear Sir,

As i want to code a strategy,

MACD PERIOD (26,12,9, EMA) AND EMA(5 CLOSE), EMA(6 OPEN) in 15-min chart.
BUY- WHEN MACD LINE CROSSES ABOVE THE SLOW SIGNAL LINE AND 5 EMA CROSSOVER 6 EMA IN UPWARD DIRECTION.
SELL- WHEN MACD FAST LINE CROSSES BELOW THE SLOW LINE AND 5 EMA CROSSOVER 6 EMA IN DOWNWARD DIRECTION.

As per the above given condition

Buy Script:

SET A = MACDSignal(13, 26, 9, SIMPLE)
SET B = MACD(13, 26, 9, SIMPLE)
CROSSOVER(A, B) = TRUE   AND
CROSSOVER(EMA(CLOSE,5),EMA(CLOSE,6))

Sell Script:

SET A = MACDSignal(12, 26, 9, SIMPLE)
SET B = MACD(12, 26, 9, SIMPLE)
CROSSOVER(B, A) = TRUE   AND
CROSSOVER(EMA(CLOSE,6),EMA(CLOSE,5))