Skip to content

Commit

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

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

// poke each cash object to update from the recent security data
foreach (var cash in algorithm.Portfolio.CashBook.Values.Where(x => x.CurrencyConversion != null))
{
Expand Down Expand Up @@ -302,9 +305,6 @@ 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();

Expand Down

0 comments on commit 1167099

Please sign in to comment.