/// <summary> /// Gets the buying power available for a trade /// </summary> /// <param name="parameters">A parameters object containing the algorithm's potrfolio, security, and order direction</param> /// <returns>The buying power available for the trade</returns> public BuyingPower GetBuyingPower(BuyingPowerParameters parameters) { using (Py.GIL()) { return(_model.GetBuyingPower(parameters)); } }
/// <summary> /// Gets the buying power available for a trade /// </summary> /// <param name="parameters">A parameters object containing the algorithm's potrfolio, security, and order direction</param> /// <returns>The buying power available for the trade</returns> public BuyingPower GetBuyingPower(BuyingPowerParameters parameters) { using (Py.GIL()) { return((_model.GetBuyingPower(parameters) as PyObject).GetAndDispose <BuyingPower>()); } }
public BuyingPower GetBuyingPower(BuyingPowerParameters parameters) { EnsureSecurityExists(parameters.Security); var expected = SecurityModel.GetBuyingPower(parameters); if (reentry) { return(expected); } reentry = false; return(expected); }