Lean
$LEAN_TAG$
|
The SqueezeMomentum indicator calculates whether the market is in a "squeeze" condition, determined by comparing Bollinger Bands to Keltner Channels. When the Bollinger Bands are inside the Keltner Channels, the indicator returns 1 (squeeze on). Otherwise, it returns -1 (squeeze off). More...
Public Member Functions | |
SqueezeMomentum (string name, int bollingerPeriod, decimal bollingerMultiplier, int keltnerPeriod, decimal keltnerMultiplier) | |
Initializes a new instance of the SqueezeMomentum class. More... | |
override void | Reset () |
Resets the state of the indicator, including all sub-indicators. More... | |
Public Attributes | |
override bool | IsReady => BollingerBands.IsReady && KeltnerChannels.IsReady |
Indicates whether the indicator is ready and has enough data for computation. The indicator is ready when both the Bollinger Bands and the Average True Range are ready. More... | |
Protected Member Functions | |
override decimal | ComputeNextValue (IBaseDataBar input) |
Computes the next value of the indicator based on the input data bar. More... | |
Protected Member Functions inherited from QuantConnect.Indicators.BarIndicator | |
BarIndicator (string name) | |
Creates a new TradeBarIndicator with the specified name More... | |
Properties | |
BollingerBands | BollingerBands [get] |
The Bollinger Bands indicator used to calculate the upper, lower, and middle bands. More... | |
KeltnerChannels | KeltnerChannels [get] |
The Keltner Channels indicator used to calculate the upper, lower, and middle channels. More... | |
int | WarmUpPeriod [get] |
Gets the warm-up period required for the indicator to be ready. This is determined by the warm-up period of the Bollinger Bands indicator. More... | |
Properties inherited from QuantConnect.Indicators.IIndicatorWarmUpPeriodProvider | |
int | WarmUpPeriod [get] |
Required period, in data points, for the indicator to be ready and fully initialized. More... | |
The SqueezeMomentum indicator calculates whether the market is in a "squeeze" condition, determined by comparing Bollinger Bands to Keltner Channels. When the Bollinger Bands are inside the Keltner Channels, the indicator returns 1 (squeeze on). Otherwise, it returns -1 (squeeze off).
Definition at line 26 of file SqueezeMomentum.cs.
QuantConnect.Indicators.SqueezeMomentum.SqueezeMomentum | ( | string | name, |
int | bollingerPeriod, | ||
decimal | bollingerMultiplier, | ||
int | keltnerPeriod, | ||
decimal | keltnerMultiplier | ||
) |
Initializes a new instance of the SqueezeMomentum class.
name | The name of the indicator. |
bollingerPeriod | The period used for the Bollinger Bands calculation. |
bollingerMultiplier | The multiplier for the Bollinger Bands width. |
keltnerPeriod | The period used for the Average True Range (ATR) calculation in Keltner Channels. |
keltnerMultiplier | The multiplier applied to the ATR for calculating Keltner Channels. |
Definition at line 46 of file SqueezeMomentum.cs.
|
protected |
Computes the next value of the indicator based on the input data bar.
input | The input data bar. |
Definition at line 73 of file SqueezeMomentum.cs.
override void QuantConnect.Indicators.SqueezeMomentum.Reset | ( | ) |
Resets the state of the indicator, including all sub-indicators.
Definition at line 97 of file SqueezeMomentum.cs.
override bool QuantConnect.Indicators.SqueezeMomentum.IsReady => BollingerBands.IsReady && KeltnerChannels.IsReady |
Indicates whether the indicator is ready and has enough data for computation. The indicator is ready when both the Bollinger Bands and the Average True Range are ready.
Definition at line 63 of file SqueezeMomentum.cs.
|
get |
The Bollinger Bands indicator used to calculate the upper, lower, and middle bands.
Definition at line 31 of file SqueezeMomentum.cs.
|
get |
The Keltner Channels indicator used to calculate the upper, lower, and middle channels.
Definition at line 36 of file SqueezeMomentum.cs.
|
get |
Gets the warm-up period required for the indicator to be ready. This is determined by the warm-up period of the Bollinger Bands indicator.
Definition at line 57 of file SqueezeMomentum.cs.