In the google charts what is the difference between macd and ema and divergnece?

in google charts let me clear it…

macd(26,12,9) …and macd= some values.1.02… ema =some values…1.04…divergnece=some values…0.33 how to write a trade script when divergence goes above 0.33 it should give buy signal…

for the above condition you can write


MACD(13, 26, 9, SIMPLE) > 0.33 AND EMA(CLOSE,25)>OPEN

for EMA you can write refereing with OHLC