/// <summary> /// Wrapper for <see cref = "IAlgorithm.SetBrokerageMessageHandler" /> in Python /// </summary> /// <param name="brokerageMessageHandler"></param> public void SetBrokerageMessageHandler(IBrokerageMessageHandler brokerageMessageHandler) { using (Py.GIL()) { _algorithm.SetBrokerageMessageHandler(brokerageMessageHandler); } }
/// <summary> /// Sets the implementation used to handle messages from the brokerage. /// The default implementation will forward messages to debug or error /// and when a <see cref="BrokerageMessageType.Error"/> occurs, the algorithm /// is stopped. /// </summary> /// <param name="handler">The message handler to use</param> public void SetBrokerageMessageHandler(IBrokerageMessageHandler handler) { _baseAlgorithm.SetBrokerageMessageHandler(handler); }
/// <summary> /// Initializes a new instance of the <see cref="DowngradeErrorCodeToWarningBrokerageMessageHandler"/> class /// </summary> /// <param name="brokerageMessageHandler">The brokerage message handler to be wrapped</param> /// <param name="errorCodesToIgnore">The error codes to convert to warning messages</param> public DowngradeErrorCodeToWarningBrokerageMessageHandler(IBrokerageMessageHandler brokerageMessageHandler, List <string> errorCodesToIgnore) { _brokerageMessageHandler = brokerageMessageHandler; _errorCodesToIgnore = errorCodesToIgnore.ToHashSet(); }
public void SetBrokerageMessageHandler(IBrokerageMessageHandler handler) { Algo.SetBrokerageMessageHandler(handler); }