Kelvin,
It is working now in Version 5.5. Problem 2 solved by removing last zeros in the Plot() statements wherever it occurred.
For example-
Plot(LineArray(i, StopLoss - 0.01, BarCount - 1, StopLoss - 0.01, 0), "", ColorRGB(255, 0, 0), styleDots | styleNoLabel, Null, Null, 0, 0, 1);
was...