Fixes WarmUpIndicator Overload Inconsistency (#6246)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
`WarmUpIndicator` for Python indicators doesn't return the indicator anymore after #6027. So all overloads should return `void`. Fixes `SmaCrossUniverseSelectionAlgorithm` [C# and Py].
This commit is contained in:
committed by
GitHub
parent
7e64bd0265
commit
0c9c8c45e5
@@ -661,21 +661,18 @@ namespace QuantConnect.Algorithm
|
||||
public void WarmUpIndicator(Symbol symbol, PyObject indicator, Resolution? resolution = null, PyObject selector = null)
|
||||
{
|
||||
// TODO: to be removed when https://github.com/QuantConnect/pythonnet/issues/62 is solved
|
||||
IndicatorBase<IndicatorDataPoint> indicatorDataPoint;
|
||||
IndicatorBase<IBaseDataBar> indicatorDataBar;
|
||||
IndicatorBase<TradeBar> indicatorTradeBar;
|
||||
|
||||
if (indicator.TryConvert(out indicatorDataPoint))
|
||||
if (indicator.TryConvert(out IndicatorBase<IndicatorDataPoint> indicatorDataPoint))
|
||||
{
|
||||
WarmUpIndicator(symbol, indicatorDataPoint, resolution, selector?.ConvertToDelegate<Func<IBaseData, decimal>>());
|
||||
return;
|
||||
}
|
||||
else if (indicator.TryConvert(out indicatorDataBar))
|
||||
if (indicator.TryConvert(out IndicatorBase<IBaseDataBar> indicatorDataBar))
|
||||
{
|
||||
WarmUpIndicator(symbol, indicatorDataBar, resolution, selector?.ConvertToDelegate<Func<IBaseData, IBaseDataBar>>());
|
||||
return;
|
||||
}
|
||||
else if (indicator.TryConvert(out indicatorTradeBar))
|
||||
if (indicator.TryConvert(out IndicatorBase<TradeBar> indicatorTradeBar))
|
||||
{
|
||||
WarmUpIndicator(symbol, indicatorTradeBar, resolution, selector?.ConvertToDelegate<Func<IBaseData, TradeBar>>());
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user