Using 2 MACD with different settings and ADX for determining if is trending or ranging.
ADX below 20 >> ranging
ADX above 23 >> trending
Since the systems use 2 MACD crossing, I removed signal line and histogram.
What you see as a histogram it's actually MACD value plotted histo style.
Please comment if you think it can be improved.
Enjoy!
Thank you!