Error Code 1 & Error Code 147 While trying to modify for trailing stop...

 
I rewrote the code and the error disappeared, not sure what the issue was.
Reason: