What mcbee said, plus there is an error in the trigger expression in the cancel options, the second formula is r_ticks(lay_price,2)1000, the "1000" is probably left from the default value.
However this does not explain the program termination. Hold on, let me look into it for you, will post again later...