How to get data from a symbol

 
hello, does someone has a piece of code in order to retrieve some data like bid and ask?
I am using symbolselect() and refreshrates() but sometimes I cannot retrieve data
 
Jerome Raymond Lafon:
hello, does someone has a piece of code in order to retrieve some data like bid and ask?
I am using symbolselect() and refreshrates() but sometimes I cannot retrieve data
double entry=SymbolInfoDouble("GBPUSD" ,SYMBOL_ASK);
Reason: