I have an Expert Advisor which is operating on multiple pairs.
The problem is that when i close positions, from time to time i get repeated 136 errors ( off quotes ).
I'm getting Bid Ask through MarketInfo; since RefreshRates() is totally uneffective, how to update the prices for a specific symbol?
That's fine, thank you. I guess this way i can avoid those requote errors. But what if i want to update prices in order to prevent requotes?
Even if i'm handling those errors i have no way to refresh all pairs prices, and i'm probably going to enter late in the trade because of the repetition of this error
Price Data Structure
double bid = SymbolInfoDouble(symbol, SYMBOL_BID),
ask = SymbolInfoDouble(symbol, SYMBOL_ASK);
What part of "you must handle" and the links provided was unclear?
The function linked to, opens a hidden chart for the symbol/TF in question (if not already open,) thus updating history, and temporarily placing the symbol on Market Watch (if not already there,) so SymbolInfoDouble(symbol, SYMBOL_BID) or MarketInfo(symbol, MODE_BID) don't return zero the first call.
the unclear part is: it is almost useless to handle an error if i don't even try to get the new data. First, let's try to refresh price data, then i will handle error if prices were not updated.
If i need data from a website, then
read a, use it
handle error or exceptions if needed
This works. The following doesn't work
a has not been updated, so the rest is useless
actually i didn't need to download history, so it looked like some kind of solution but NOT the right solution. In that sense, it was really unclear.
Anyway, if there's no other ways, it's fine.
Secondly, i think you will avoid people arguing about your answers if you just add one plus line to your comments, the link looked quite off topic.
It's not mandatory, it's just if you want people to be more happy about your answers and try to get more popularity / authority / whatever.