The logic of your EA is correct. Sadly you will not be able to get those entries with MACD. It is a very slow indicator with your block's configuration. You will have to find other indicators to do that. I recommend you Zigzag combined with a fast RVI.
Same with exits. Using MACD as a way to close trades will inevitably make you 'lose' pips for that same reason.
Just an opinion, of course.
Maybe a real programmer can offer you a better answer.


