predfined variables and marketinfo function

 

Need clarification when I should use the Bid and Ask variables and when I should use the MarketInfo function to obtain the same information. Which one is the most up to date info, the predefined variables or using the MarketInfo function to obtain the data?

 

FM

Bid/Ask and MarketInfo are equally as current, as the last tick the EA accepted

If there is any chance that your reference to these is out of date because of upstrem processing in your EA (causing it to miss a tick)

then use RefreshRates( ) to get the current values

I usually use this routinely just prior to placing an order

Good Luck

-BB-

 
Also MarketInfo is also used if you are hedging or trying to get data from a different pair or timeline.
 
BarrowBoy wrote >>

FM

Bid/Ask and MarketInfo are equally as current, as the last tick the EA accepted

If there is any chance that your reference to these is out of date because of upstrem processing in your EA (causing it to miss a tick)

then use RefreshRates( ) to get the current values

I usually use this routinely just prior to placing an order

Good Luck

-BB-

Thanks for the info.

 
jmca wrote >>
Also MarketInfo is also used if you are hedging or trying to get data from a different pair or timeline.

Thanks for the info.

Reason: