I wrote the following code in an indicator:
int start()
{
if ( firstRun ) {
WindowScreenShot("WTFTEST.GIF",1024,768);
int handle = FileOpen("WTFTEST.TXT",FILE_WRITE);
FileWrite(handle,Bid + ","+Ask);
FileClose(handle);
firstRun = false;
}
return(0);
}
When I ran it while backtesting, the screen shot showed the chart with the backtest time and prices, but the text file contained Bid and Ask prices from current server feeds (i.e. present values, not values relative to the backtest timeframe.)
What is going on, here?
(a) is there another API I should be using?
(b) does that infer that I should not use "Bid" and "Ask" APIs in my EAs and indicators?
int start()
{
if ( firstRun ) {
WindowScreenShot("WTFTEST.GIF",1024,768);
int handle = FileOpen("WTFTEST.TXT",FILE_WRITE);
FileWrite(handle,Bid + ","+Ask);
FileClose(handle);
firstRun = false;
}
return(0);
}
When I ran it while backtesting, the screen shot showed the chart with the backtest time and prices, but the text file contained Bid and Ask prices from current server feeds (i.e. present values, not values relative to the backtest timeframe.)
What is going on, here?
(a) is there another API I should be using?
(b) does that infer that I should not use "Bid" and "Ask" APIs in my EAs and indicators?
Attached File(s)