Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonabreul committed Jan 23, 2025
1 parent d117e61 commit c99bf10
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Engine/AlgorithmManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,6 @@ public void Run(AlgorithmNodePacket job, IAlgorithm algorithm, ISynchronizer syn
cash.Update();
}

// security prices got updated
algorithm.Portfolio.InvalidateTotalPortfolioValue();

// process fill models on the updated data before entering algorithm, applies to all non-market orders
transactions.ProcessSynchronousEvents();

if (timeSlice.Slice.SymbolChangedEvents.Count != 0)
{
try
Expand All @@ -308,6 +302,12 @@ public void Run(AlgorithmNodePacket job, IAlgorithm algorithm, ISynchronizer syn
}
}

// security prices got updated
algorithm.Portfolio.InvalidateTotalPortfolioValue();

// process fill models on the updated data before entering algorithm, applies to all non-market orders
transactions.ProcessSynchronousEvents();

// fire real time events after we've updated based on the new data
realtime.SetTime(timeSlice.Time);

Expand Down

0 comments on commit c99bf10

Please sign in to comment.