MQL4: Error 129 on OrderSend and OrderClose - page 2

 

Thank you dema for sharing the solution you found :  RefreshRates() it helped me

 
dema:

I resolve my trouble simply use the function RefreshRates() before use Ask or Bid values.

I think they are initialized when my script start to run, so when I use it, if I don't refresh with RefreshRates(), are obsolete.=

They are valid at the start of OnTick/start. They are invalid after any server call and Sleep. RTFM Predefined Variables and RefreshRates Function - Variables - MQL4 Tutorial