File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Common/Data/Consolidators Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,15 @@ namespace QuantConnect.Data.Consolidators
2626 public class IdentityDataConsolidator < T > : DataConsolidator < T >
2727 where T : IBaseData
2828 {
29- private static readonly bool IsTick = typeof ( T ) == typeof ( Tick ) ;
29+ private static readonly bool IsTick = typeof ( T ) == typeof ( Tick ) ;
3030
3131 private T _last ;
3232
33+ /// <summary>
34+ /// Stores the timestamp of the last processed data item.
35+ /// </summary>
36+ public DateTime _lastTime ;
37+
3338 /// <summary>
3439 /// Gets a clone of the data being currently consolidated
3540 /// </summary>
@@ -43,7 +48,7 @@ public override IBaseData WorkingData
4348 /// </summary>
4449 public override Type OutputType
4550 {
46- get { return typeof ( T ) ; }
51+ get { return typeof ( T ) ; }
4752 }
4853
4954 /// <summary>
@@ -52,10 +57,11 @@ public override Type OutputType
5257 /// <param name="data">The new data for the consolidator</param>
5358 public override void Update ( T data )
5459 {
55- if ( IsTick || _last == null || _last . EndTime != data . EndTime )
60+ if ( IsTick || _last == null || data . EndTime != _lastTime )
5661 {
5762 OnDataConsolidated ( data ) ;
5863 _last = data ;
64+ _lastTime = data . EndTime ;
5965 }
6066 }
6167
You can’t perform that action at this time.
0 commit comments