question about ask/bid and markitinfo(symbol,mode_ask/bid)

 

i want to know

1/ if start function trigered by ticks, if we can get every ask/bid value from server,

2/ if get ask/bid value by markitinfo(symbol,mode_ask/bid) function,is it same by use ask/bid directly,

is there some value missing ?,and may it use more time to get the value,may it get "contest is busy" erro .

thanks

 
YALEWANG:

i want to know

1/ if start function trigered by ticks, if we can get every ask/bid value from server,

2/ if get ask/bid value by markitinfo(symbol,mode_ask/bid) function,is it same by use ask/bid directly,

is there some value missing ?,and may it use more time to get the value,may it get "contest is busy" erro .

thanks

>1/ if start function trigered by ticks, if we can get every ask/bid value from server,

Yes, Use the predefined variables Ask and Bid.

>2/ if get ask/bid value by markitinfo(symbol,mode_ask/bid) function,is it same by use ask/bid directly,

Yes, if you are using the Symbol (eg EURUSD) from the current chart.

If you do something which takes a lot of time, such as placing an order, you should either wait for the next tick or use RefreshRates to update the Bid and Ask prices.

Read this ...

https://book.mql4.com/variables/predefined

 
YALEWANG:

i want to know

1/ if start function trigered by ticks, if we can get every ask/bid value from server,

2/ if get ask/bid value by markitinfo(symbol,mode_ask/bid) function,is it same by use ask/bid directly,

3) is there some value missing ?,and may it use more time to get the value,may it get "contest is busy" erro .

thanks

1. Yes

2. Yes

3. No, No . . . you need to bear something in mind though . . . 2 ticks may arrive at EURUSD while none have arrived at GBPUSD . . . so for EURUSD you will have received 2 lots of Bid and Ask info which are correct, for GBPUSD you will have gotten the same set of Bid and Ask info for both ticks. You can't do what you are suggesting to gather tick data for other pairs . . well you can but your data will be wrong . . . you have to do it for each pair with an indicator EA or Script on each pair you want the data for . . .

Reason: