... I have noticed that many times:
When Blue vertex rises high, and ends, and blue begins to fall ... The trend usually starts to fall too. In red is the same...
I understood that's when ExhaustionBar indi should help, i.e. gives you a signal 'the trend is exhausted and is about to reverse' . I cannot decompile 'ExhaustionBar' indicator from ex4, but it looks somewhat dumb: sometimes it gives you 'exhaustion' signal after 40% retracement, sometimes it doesn't catch a trend change after 200% retracement.
If you call iCustom("ExhaustionBar") from your EA, it may even miss that 'bar'. (btw, do you have this indi in mq4?)
Tweaking this indi failed, I'd suggest you try MFI at level 80/20 for overbought/oversold and its direction instead. I find helpful MFI(8) -> MA(8) crossing as well, e.g

Sorry, I stick to M5/M1 timeframes for a quick buck
