I converted the indicator for mql5, it compiles but I have not tested it (it was only a warm up morning exercise). Let me know if it does not work and I will have another look. file