Lean
$LEAN_TAG$
|
Implements the Mesa Adaptive Moving Average (MAMA) indicator along with the following FAMA (Following Adaptive Moving Average) as a secondary indicator. The MAMA adjusts its smoothing factor based on the market's volatility, making it more adaptive than a simple moving average. More...
Public Member Functions | |
MesaAdaptiveMovingAverage (string name, decimal fastLimit=0.5m, decimal slowLimit=0.05m) | |
Initializes a new instance of the MesaAdaptiveMovingAverage class. More... | |
MesaAdaptiveMovingAverage (decimal fastLimit=0.5m, decimal slowLimit=0.05m) | |
Initializes a new instance of the MesaAdaptiveMovingAverage class with default name ("MAMA") and the specified fast and slow limits for the adaptive moving average calculation. More... | |
override void | Reset () |
Resets the indicator's state, clearing history and resetting internal values. More... | |
Public Attributes | |
override bool | IsReady => Samples >= WarmUpPeriod |
Returns whether the indicator has enough data to be used (ready to calculate values). More... | |
int | WarmUpPeriod => 33 |
Gets the number of periods required for warming up the indicator. 33 periods are sufficient for the MAMA to provide stable and accurate results, More... | |
Protected Member Functions | |
override decimal | ComputeNextValue (IBaseDataBar input) |
Computes the next value for the Mesa Adaptive Moving Average (MAMA). It calculates the MAMA by applying a series of steps including smoothing, detrending, and phase adjustments. More... | |
Protected Member Functions inherited from QuantConnect.Indicators.BarIndicator | |
BarIndicator (string name) | |
Creates a new TradeBarIndicator with the specified name More... | |
Properties | |
IndicatorBase< IndicatorDataPoint > | Fama [get] |
Gets the FAMA (Following Adaptive Moving Average) indicator value. 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... | |
Implements the Mesa Adaptive Moving Average (MAMA) indicator along with the following FAMA (Following Adaptive Moving Average) as a secondary indicator. The MAMA adjusts its smoothing factor based on the market's volatility, making it more adaptive than a simple moving average.
Definition at line 25 of file MesaAdaptiveMovingAverage.cs.
QuantConnect.Indicators.MesaAdaptiveMovingAverage.MesaAdaptiveMovingAverage | ( | string | name, |
decimal | fastLimit = 0.5m , |
||
decimal | slowLimit = 0.05m |
||
) |
Initializes a new instance of the MesaAdaptiveMovingAverage class.
name | The name of the indicator. |
fastLimit | The fast limit for the adaptive moving average (default is 0.5). |
slowLimit | The slow limit for the adaptive moving average (default is 0.05). |
Definition at line 74 of file MesaAdaptiveMovingAverage.cs.
QuantConnect.Indicators.MesaAdaptiveMovingAverage.MesaAdaptiveMovingAverage | ( | decimal | fastLimit = 0.5m , |
decimal | slowLimit = 0.05m |
||
) |
Initializes a new instance of the MesaAdaptiveMovingAverage class with default name ("MAMA") and the specified fast and slow limits for the adaptive moving average calculation.
fastLimit | The fast limit for the adaptive moving average (default is 0.5). |
slowLimit | The slow limit for the adaptive moving average (default is 0.05). |
Definition at line 101 of file MesaAdaptiveMovingAverage.cs.
|
protected |
Computes the next value for the Mesa Adaptive Moving Average (MAMA). It calculates the MAMA by applying a series of steps including smoothing, detrending, and phase adjustments.
input | The input bar (price data). |
Definition at line 124 of file MesaAdaptiveMovingAverage.cs.
override void QuantConnect.Indicators.MesaAdaptiveMovingAverage.Reset | ( | ) |
Resets the indicator's state, clearing history and resetting internal values.
Definition at line 264 of file MesaAdaptiveMovingAverage.cs.
override bool QuantConnect.Indicators.MesaAdaptiveMovingAverage.IsReady => Samples >= WarmUpPeriod |
Returns whether the indicator has enough data to be used (ready to calculate values).
Definition at line 110 of file MesaAdaptiveMovingAverage.cs.
int QuantConnect.Indicators.MesaAdaptiveMovingAverage.WarmUpPeriod => 33 |
Gets the number of periods required for warming up the indicator. 33 periods are sufficient for the MAMA to provide stable and accurate results,
Definition at line 116 of file MesaAdaptiveMovingAverage.cs.
|
get |
Gets the FAMA (Following Adaptive Moving Average) indicator value.
Definition at line 66 of file MesaAdaptiveMovingAverage.cs.