You can use iClose:
//+------------------------------------------------------------------+ //| CheckMarketBid.mq4 | //| Copyright © 2007, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "Copyright © 2007, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { //---- double closeAnotherrSymbol = iClose("GBPUSD",0,0); int err = GetLastError(); if (err!=0) Print("Error code = ",err); else Print("closeAnotherrSymbol = ",closeAnotherrSymbol); //---- return(0); } //+------------------------------------------------------------------+
Maybe I know why this is happening...
I am actually testing an indicator that I add to the tester chart, but seems that indicator takes these values from an actual not a test mode in visual test chart.
I have this problem too -- just posted a new thread. Any resolutions would be appreciated.

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
While testiing on the Visual Tester I noticed that Bid returns the actual Bid from this past Friday instead of current Tester Bid.
Not sure what the problem is here. Is it becuase the market is closed?
MarketInfo(Symbol(),MODE_BID) doesn't help.
This is pretty silly.
Any workaround for this?
PS. since I am looking for Bid right at the open of new bar I just used Open[0] for Bid and Open[0]+MarketInfo(Symbol(),MODE_SPREAD)*Point for Ask
But for other cases it's unacceptable.