QuantConnect Lean Algorithmic Trading Engine
QuantConnect.Indicators Namespace > IndicatorExtensions Class > WeightedBy Method : WeightedBy(PyObject,PyObject,Int32) Method
Indicator that will be averaged
Indicator that provides the average weights
Average period
WeightedBy(PyObject,PyObject,Int32) Method
Creates a new CompositeIndicator such that the result will be average of a first indicator weighted by a second one
Syntax
public static CompositeIndicator<IndicatorDataPoint> WeightedBy( 
   Python.Runtime.PyObject value,
   Python.Runtime.PyObject weight,
   int period
)

Parameters

value
Indicator that will be averaged
weight
Indicator that provides the average weights
period
Average period

Return Value

Indicator that results of the average of first by weights given by second
Requirements

Target Platforms: Microsoft .NET 4.5 or Mono 3.10 or above.

See Also