QuantConnect Lean Algorithmic Trading Engine
The symbol whose SMA we want
The period of the SMA
The resolution
Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value)
SMA Method (QCAlgorithm)
Creates an SimpleMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.
Syntax

Parameters

symbol
The symbol whose SMA we want
period
The period of the SMA
resolution
The resolution
selector
Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value)

Return Value

The SimpleMovingAverage for the given parameters
Requirements

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

See Also