Lean  $LEAN_TAG$
QuantConnect.Algorithm.Framework.Alphas.RsiAlphaModel Class Reference

Uses Wilder's RSI to create insights. Using default settings, a cross over below 30 or above 70 will trigger a new insight. More...

Inheritance diagram for QuantConnect.Algorithm.Framework.Alphas.RsiAlphaModel:
[legend]

Public Member Functions

 RsiAlphaModel (int period=14, Resolution resolution=Resolution.Daily)
 Initializes a new instance of the RsiAlphaModel class More...
 
override IEnumerable< InsightUpdate (QCAlgorithm algorithm, Slice data)
 Updates this alpha model with the latest data from the algorithm. This is called each time the algorithm receives data for subscribed securities More...
 
override void OnSecuritiesChanged (QCAlgorithm algorithm, SecurityChanges changes)
 Cleans out old security data and initializes the RSI for any newly added securities. This functional also seeds any new indicators using a history request. More...
 
- Public Member Functions inherited from QuantConnect.Algorithm.Framework.Alphas.AlphaModel
 AlphaModel ()
 Initialize new AlphaModel More...
 

Additional Inherited Members

- Properties inherited from QuantConnect.Algorithm.Framework.Alphas.AlphaModel
virtual string Name [get, set]
 Defines a name for a framework model More...
 
- Properties inherited from QuantConnect.Algorithm.Framework.Alphas.INamedModel
string Name [get]
 Defines a name for a framework model More...
 

Detailed Description

Uses Wilder's RSI to create insights. Using default settings, a cross over below 30 or above 70 will trigger a new insight.

Definition at line 29 of file RsiAlphaModel.cs.

Constructor & Destructor Documentation

◆ RsiAlphaModel()

QuantConnect.Algorithm.Framework.Alphas.RsiAlphaModel.RsiAlphaModel ( int  period = 14,
Resolution  resolution = Resolution.Daily 
)

Initializes a new instance of the RsiAlphaModel class

Parameters
periodThe RSI indicator period
resolutionThe resolution of data sent into the RSI indicator

Definition at line 41 of file RsiAlphaModel.cs.

Member Function Documentation

◆ Update()

override IEnumerable<Insight> QuantConnect.Algorithm.Framework.Alphas.RsiAlphaModel.Update ( QCAlgorithm  algorithm,
Slice  data 
)
virtual

Updates this alpha model with the latest data from the algorithm. This is called each time the algorithm receives data for subscribed securities

Parameters
algorithmThe algorithm instance
dataThe new data available
Returns
The new insights generated

Reimplemented from QuantConnect.Algorithm.Framework.Alphas.AlphaModel.

Definition at line 58 of file RsiAlphaModel.cs.

Here is the call graph for this function:

◆ OnSecuritiesChanged()

override void QuantConnect.Algorithm.Framework.Alphas.RsiAlphaModel.OnSecuritiesChanged ( QCAlgorithm  algorithm,
SecurityChanges  changes 
)
virtual

Cleans out old security data and initializes the RSI for any newly added securities. This functional also seeds any new indicators using a history request.

Parameters
algorithmThe algorithm instance that experienced the change in securities
changesThe security additions and removals from the algorithm

Reimplemented from QuantConnect.Algorithm.Framework.Alphas.AlphaModel.

Definition at line 96 of file RsiAlphaModel.cs.


The documentation for this class was generated from the following file: