Question about ZeroMemory

 

in this doc Trade Operation Types all operation about placing a new instant and pending order have no ZeroMemory, but every operation about modifying or closing open order and pending has ZeroMemory in it. i experienced some error modifying SL/TP when i first start learning mql5 but i forget what it was. all i remember is the code works after i add ZeroMemory. 

Question: what does it do? i read it is about zeroing value, but what happen if i don't add it and why placing a new order don't need it? also regarding this code below from Trade Operation Types, why it zeroing the value before the OrderSend(request,result) is sent? thanks in advance

//--- zeroing the request and result values
         ZeroMemory(request);
         ZeroMemory(result);
//--- send the request
         if(!OrderSend(request,result))
Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Trade Operation Types
Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Trade Operation Types
  • www.mql5.com
Trading is done by sending orders to open positions using the OrderSend() function, as well as to place, modify or delete pending orders. Each...