Quote from giles117:
Herman is the author of this code, and very helpful I might add. I was having issues with it sending multiple orders and he kindly recoded it on his end to eliminate the duplicates...
Perhapsby contacting herman via email, he can add the cancellation code in it for you.....
Thanks! you r so very helpful

also thanks to Perhapsby and Herman!
so you r implying that Herman's code already works in a chronological way? (that is, the fulfillment of condition1 being a prerequisite of condition2's pending state)