Add OnWarmupFinished method to QCAlgorithm
This method is being added to allow algorithms to complete initialization tasks that cannot be executed during Initialize, such as cancelling existing open orders in live trading. This method will be called only once, when the warmup task is complete. Closes #1043
This commit is contained in:
@@ -918,6 +918,17 @@ namespace QuantConnect.AlgorithmFactory.Python.Wrappers
|
||||
_baseAlgorithm.PostInitialize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the algorithm has completed initialization and warm up.
|
||||
/// </summary>
|
||||
public void OnWarmupFinished()
|
||||
{
|
||||
using (Py.GIL())
|
||||
{
|
||||
_algorithm.OnWarmupFinished();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes the security with the specified symbol. This will cancel all
|
||||
/// open orders and then liquidate any existing holdings
|
||||
|
||||
Reference in New Issue
Block a user