You must set Stop, TrailLock, etc. _before_ you enter a trade, not afterwards. Just as in real life.

http://manual.zorro-trader.com/stop.htm

For directly manipulating the stop limit in a TMF, you can use the TradeStopLimit variable. And set the TICKS flag. Simulation then takes longer, but without simulating ticks the TMF would make not much sense.

BTW, when posting code, please use the "Code" tag - it's the hash button on the reply screen. Otherwise it's a little hard to read.