How to get exact price of a symbol without open its chart

 

Hi,

I make an EA run from 1 chart. This EA want to get the exact price of all current tradable symbol of that time.

1) I open file symbol.raw to get all available symbol and use function MarketInfo(sym,MODE_TRADEALLOWED); to check if it is tradable.

Some symbol that function return 1 but the symbol is not tradable. Any better way to check this.

 2) When getting lastest price of a symbol, i've tried to ways 

*) use

RefreshRates();

MarketInfo(sym,MODE_BID); 

 

**) use MqlTick

I also use iOpen(sym,PERIOD_M1,0) periodically to keep the symbol refresh in terminal memory.

But sometime the EA still get the wrong quotes value (far way from high and low of current M1 candles).

How should i do to solve this.

Hope to see solution from you. 

Reason: