When I want to modify only the stop loss of an opened order, should I use zeros for price, takeprofit and expiration parameters as shown in the following?
OrderModify(OrderTicket(), 0, newStop, 0, 0)
You can't use zero for the price, A) can't modify price of an open order, or B) zero is an invalid price. You can use zero for the others if you don't want them.
Use the actual values OrderOpenPrice(), OrderTakeProfit() and OrderExpiration() Trade Functions - MQL4 Reference
You would know that had you bothered to look at the example provided
If we want to change the stop loss of a pending order, same is valid?
As the reference says that "Open price and expiration time can be changed
only for pending orders. If unchanged values are passed as the function
parameters, the error 1 (ERR_NO_RESULT) will be generated."