I don't think that you can use brokerCommand(SET_ORDERTEXT) unless you have the beta version. The "hanging" is probably caused by sending an unknown command to MT4.