Right order to put OrderSend(),OrderModify()

 

Day ago i read this topic in forum https://forum.mql4.com/25842

and this topic give me a clue why some EA work and other did not, and i wonder how to put this code in EA to become work.Any examples?

Reason: