Slawa: "HistoryBase: 2 errors in 'SYMBOL'" error

 
Hi Slawa,

I have a chart with an EA that is sending tick events to an offline chart with a non-standard symbol. The offline chart is executing code with every tick -- so this is working.

But, on the offline chart I have an indicator that is writing data to a non-standard history file. The history file it is writing to is the same history file that it is attached to.

After the indicator starts writing history, I get the following error in the journal:

"HistoryBase: 3 errors in 'MYSYMBL'" where MYSYMBL is the non-standard symbol I am using.

It is writing to the history file like this:


.........
   if (nPeriodTime>Time[0]) 
     {
     //new bar detected
     // first write the old data (again) which will also move the record pointer forward
     // to the new file position
     WriteHistoryData();
     // now prepare to write the new data;		
      i_time=nPeriodTime;
      d_open=currEquity;
      d_low=currEquity;
      d_high=currEquity;
      d_close=currEquity;
      d_volume=currBalance; 
     }
else
     {
     // just prepare to update the existing data with new values
     i_time=Time[0];
     d_open=Open[0];
     if(currEquity>d_high) d_high=currEquity;
     if(currEquity<d_low) d_low=currEquity;
     d_close=currEquity;
     d_volume=currBalance;
}

// capture the current file position, write the data, 
// then move back to the original position so the
// next time I write it will update the data		
last_fpos = FileTell(fileHandle);
WriteHistoryData();
FileFlush(fileHandle);
FileSeek(fileHandle,last_fpos,SEEK_SET);

//+------------------------------------
void WriteHistoryData()
{
   if (fileHandle >= 0) {
      FileWriteInteger(fileHandle, i_time, LONG_VALUE);
      FileWriteDouble(fileHandle, d_open, DOUBLE_VALUE);
      FileWriteDouble(fileHandle, d_low, DOUBLE_VALUE);
      FileWriteDouble(fileHandle, d_high, DOUBLE_VALUE);
      FileWriteDouble(fileHandle, d_close, DOUBLE_VALUE);
      FileWriteDouble(fileHandle, d_volume, DOUBLE_VALUE);
   }
}



I would be SO GRATEFUL if you could help me know what I am doing wrong.

Thank you so much for all your time Slawa,

-Christian

 
This is message from filter. Wrong records are filtered. What is wrong record?

For example: volume=0, open<low, close>high and so on
 
Thank you, I will look at it and let you know.

So you know, I am writing the OHLC of the AccountEquity() of the account, and writing the AccountBalance() to the volume. Other than the filter error, is it OK for me to write this data?

Thanks again, I will check into the filter issue and let you know.

-Christian
Reason: