Refreshing all quotes

 
How do I get the current prices of all symbols using the metatrader api?

I do not want to wait until I get the UPDATE_BIDASK message for all of the different symbols.

Is this possible?

Thanks.
 
You need to keep all the incoming prices. new price rewrites previous price and You have last prices always.
 
The MetaTrader Client shows all of the prices when it starts. However, MetaTraderAPIExample2 takes a lot of time before it shows all of the prices (it shows some of them at the beginning, then it shows more after a long time). How can I get all of the prices at the beginning?

Thanks.
 
Slawa?
 
what the problem? get last history. get last close. bid=close-spread/2; ask=bid+spread;
 
I must call MtGetTradeHistory once for every currency. I can only call MtGetTradeHistory once every 5 seconds!

If I have 12 currencies, does that mean I have to wait 5 seconds * 12 = 60 seconds, before I can have all of my prices?
 
did You read our manual? You need to use MtGetRates not MtGetTradeHistory! MtGetTradesHistory requests history of your trading operations
 
I'm sorry. You are completely correct!

What parameters should I give to MtGetRates? (Specifically, what should I give for period and last_time)?
 
period - timeframe(in minutes): 1,5,15,30,60 etc
lasttime - current time
 
How do I get the spread?

I see "spread" in ConSecurity, but it is always 0 for my broker (FXDD). Thanks, Slawa.
 
use MtGetSecurityInfo function
Reason: