Skip to content

Commit 5c0ecf1

Browse files
committed
Skip warmup pulse if algorithm not locked
1 parent b54821a commit 5c0ecf1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Engine/DataFeeds/Synchronizer.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ public virtual IEnumerable<TimeSlice> StreamData(CancellationToken cancellationT
164164
/// Returns true when the first post warmup slice skips past StartDate
165165
/// so a time pulse can be emitted to align algorithm time before OnWarmupFinished fires
166166
/// </summary>
167-
protected bool ShouldEmitWarmupEndPulse(TimeSlice timeSlice) => Algorithm.IsWarmingUp && timeSlice.Time > WarmupEndUtc;
167+
protected bool ShouldEmitWarmupEndPulse(TimeSlice timeSlice)
168+
{
169+
return Algorithm.GetLocked() && Algorithm.IsWarmingUp && timeSlice.Time > WarmupEndUtc;
170+
}
168171

169172
/// <summary>
170173
/// Performs additional initialization steps after algorithm initialization

0 commit comments

Comments
 (0)