Support Board
Date/Time: Thu, 26 Dec 2024 01:42:11 +0000
Post From: Referencing data using sc.GetExactMatchForSCDateTime
[2015-11-24 15:51:03] |
wwwingman - Posts: 185 |
Hi I am using sc.GetExactMatchForSCDateTime to reference data from other time frames. It works *most* of the time. I would expect it work all the time. Maybe I missed something. I use two charts, main is 5 mn, secondary is 1 mn. Same session time/loaded number of days etc. Data is IQFeed. I use the main start date time to find the index of the secondary index. On 10 days of ES globex session (~2700 bars) I have 12 mistakes, meaning the index is not found. The data seems ok, and the mistakes don't seem to appear on special moments like start/end of day/session/whatever. Here is core of the code: for ( int _barIndex = sc.UpdateStartIndex ; _barIndex < sc.ArraySize - 1 ; _barIndex++ ) { // // Handle _barIndex bar // SCDateTime _startDateTime = sc.BaseDateTimeIn[_barIndex]; int _proxyStartIndex = sc.GetExactMatchForSCDateTime(_proxyChartNumber, _startDateTime); if( _proxyStartIndex == -1 ) { logMsg.Format("ERROR : date<%s> _proxyStartIndex<%d>", sc.FormatDateTime(sc.BaseDateTimeIn[_barIndex]).GetChars(), _proxyStartIndex); sc.AddMessageToLog(logMsg,0); continue; } } Please advise. -- W. |