QuantConnect Lean Algorithmic Trading Engine
Indicators > Indicators Reference Table
Indicators Reference Table

The following is a summary of the indicators currently available in QuantConnect and example code to access them from your QCAlgorithm.

Indicator Usage Pattern
Copy Code
var indicatorObject = [ShortCode]( symbol: "SPY", period: 3, [parameters], resolution: Resolution.Daily );

 

Short Code Class Name Example Usage
SMA SimpleMovingAverage var sma = SMA("SPY", 3, Resolution.Daily);
EMA ExponentialMovingAverage var ema = EMA("SPY", 3, Resolution.Daily);
MACD MovingAverageConvergenceDivergence var macd = MACD("SPY", 3, Resolution.Daily);
RSI RelativeStrengthIndex var rsi = RSI("SPY", 3, Resolution.Daily);
MOM Momentum var mom = MOM("SPY", 3, Resolution.Daily);
MOMP MomentumPercent var mom = MOMP("SPY", 3, Resolution.Daily);
AROON AroonOscillator var aroon = AROON("SPY", 14, 14, Resolution.Daily);
MAX Maximum var max = MAX("SPY", 14, Resolution.Daily);
MIN Minimum var min = MIN("SPY", 14, Resolution.Daily);
BB BollingerBands var bb = BB("SPY", 20, 1, MovingAverageType.Simple, Resolution.Daily);
ATR AverageTrueRange var atr = ATR("SPY", 14,  MovingAverageType.Simple, Resolution.Daily);

The short codes are static methods in the base class of QCAlgorithm. When they are called they return a new, registered instance of the indicator you've requested. The Resolution parameter specifies which Consolidator will be used on your data and can be anything you want. There is also a TimeSpan consolidator for generating custom consolidator periods. If no consolidator is provided it will select the data feed resolution.

See Also