Запаздывание формирования свечей
Столкнулся со следующей проблемой. Через QuikTrader тяну TimeFrame свечи на сентябрьский индекс РТС и декабрьский Сбер. Таймфрейм 1 минута.
Обнаружил что свечи по декабрьскому контракту формируются с очень большим опозданием.
В обработке свечей вставил следующий код:
void CandleManager_Processing(CandleSeries Series, Candle Candle)
{
Console.WriteLine("Candle " + Candle.Security.Code + " time " + Candle.CloseTime + " volume " + Candle.TotalVolume+" local time "+DateTime.Now);
if (Candle.State == CandleStates.Finished)
{
Console.WriteLine("Candle " + Candle.Security.Code + " time " + Candle.CloseTime + " volume " + Candle.TotalVolume+" local time "+DateTime.Now);
...
...
...
}
}
получил следующий результат:
Candle finished RIU2 time 13.08.2012 16:37:00 volume 1258 local time 13.08.2012 16:36:51
Candle finished RIU2 time 13.08.2012 16:38:00 volume 532 local time 13.08.2012 16:37:51
Candle finished RIU2 time 13.08.2012 16:39:00 volume 711 local time 13.08.2012 16:38:51
Candle finished SRZ2 time 13.08.2012 16:37:00 volume 1 local time 13.08.2012 16:39:03
Candle finished RIU2 time 13.08.2012 16:40:00 volume 1006 local time 13.08.2012 16:39:51
Candle finished RIU2 time 13.08.2012 16:41:00 volume 761 local time 13.08.2012 16:40:52
Candle finished RIU2 time 13.08.2012 16:42:00 volume 1170 local time 13.08.2012 16:41:51
Candle finished RIU2 time 13.08.2012 16:43:00 volume 886 local time 13.08.2012 16:42:51
Candle finished RIU2 time 13.08.2012 16:44:00 volume 425 local time 13.08.2012 16:43:51
Candle finished RIU2 time 13.08.2012 16:45:00 volume 583 local time 13.08.2012 16:44:51
Candle finished RIU2 time 13.08.2012 16:46:00 volume 929 local time 13.08.2012 16:45:51
Candle finished RIU2 time 13.08.2012 16:47:00 volume 1036 local time 13.08.2012 16:46:51
Candle finished RIU2 time 13.08.2012 16:48:00 volume 299 local time 13.08.2012 16:47:51
Candle finished RIU2 time 13.08.2012 16:49:00 volume 623 local time 13.08.2012 16:48:53
Candle finished RIU2 time 13.08.2012 16:50:00 volume 1249 local time 13.08.2012 16:49:51
Candle finished RIU2 time 13.08.2012 16:51:00 volume 735 local time 13.08.2012 16:50:51
Candle finished RIU2 time 13.08.2012 16:52:00 volume 368 local time 13.08.2012 16:51:51
Candle finished SRZ2 time 13.08.2012 16:40:00 volume 2 local time 13.08.2012 16:52:22
Candle finished RIU2 time 13.08.2012 16:53:00 volume 2071 local time 13.08.2012 16:52:51
Candle finished RIU2 time 13.08.2012 16:54:00 volume 3207 local time 13.08.2012 16:53:51
Candle finished SRZ2 time 13.08.2012 16:53:00 volume 3 local time 13.08.2012 16:53:52
Candle finished RIU2 time 13.08.2012 16:55:00 volume 3175 local time 13.08.2012 16:54:51
Candle finished RIU2 time 13.08.2012 16:56:00 volume 1876 local time 13.08.2012 16:55:51
Candle finished RIU2 time 13.08.2012 16:57:00 volume 844 local time 13.08.2012 16:56:51
Candle finished SRZ2 time 13.08.2012 16:55:00 volume 4 local time 13.08.2012 16:57:03
Candle finished RIU2 time 13.08.2012 16:58:00 volume 2532 local time 13.08.2012 16:57:51
Candle finished RIU2 time 13.08.2012 16:59:00 volume 2011 local time 13.08.2012 16:58:51
Candle finished RIU2 time 13.08.2012 17:00:00 volume 1555 local time 13.08.2012 16:59:51
Сильно похоже на то, что свечя финишируется не по завершению временного интервала а по приходу новой сделки, лежащей за пределами таймфрейма свечи. Вопроса собственно 2:
- Такой алгоритм формирования сечи общий для всех провайдеров?
- Как это можно обойти не заморачиваясь с собственным формированием свечей?