AndrewAMD is right. The code you posted seems to be JCL's stock investment code from black book, which is designed for IB. MT4 is a FX and CFDs trading platform. So make sure you know what you are trying to do first.