DislikedI have looked at the code and cannot see anything wrong.
Look at the attached pic of an eurcad trade from 6.55 am on 5th April, highlighted in the trades window.
The turquiose line marks the first macd histogram to be checked for a cross. The pic indicates the robot is checking back 1 bar too many, so I have added a fix for that.
That apart, everything looks ok.