Coding help for EMA + MACD in streak

Hi there…

I wanted my coding to enter when the price is above 200 EMA + when MACD (12 26 09) is higher than MACD signal…

The coding I done is,

Prev N (Close, -1, min) | Higher than | EMA (Close, 200, 0) | and | MACD (12, 26, 9, MACD, 0) | higher than | MACD (12, 26, 9, signal, 0)

Hope I’m right with the coding?

BUT when I convert this into strategy, I tremble with coding the EXIT CONDITION…

I want to exit when the MACD & signal crossovers OR immediately when the MACD is below or equal to the signal… I did the coding but I think its wrong…

TOTALLY CONFUSED… PLS HELP ANYONE

@Streak @Harsha_Streak @Krishnendu

Hi @Jai369

This is correct.

So you can use MACD lower than MACD signal or MACD crosses below MACD signal.

1 Like