hknight:
Using MQ4, how how can I get the ask price of a pair from three seconds ago?
This does NOT work:
You cannot ! unless you save all the Ask prices with datetie stamps. Then you can find the Ask price if you have the value just before and after 3 seconds ago.
Using MarketInfo and asking for BID price will never get you an Ask price . . . unless there is zero Spread.
Of course it doesn't work. Did you bother to read the documentation? Where did you come to think that marketInfo takes three parameters?
You can ONLY get the H, L, O, C of the current or previous bars.
If you want a price seconds ago, YOU must remember the CURRENT value and wait.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Using MQ4, how how can I get the ask price of a pair from three seconds ago?
This does NOT work:
price_3_seconds_ago = MarketInfo(pair, MODE_BID, -3);