Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
talib.MAMA
Calculates the MESA Adaptive Moving Average and returns the MAMA and FAMA.
talib.MAMA(inReal)
talib.MAMA(inReal, optInFastLimit)
talib.MAMA(inReal, optInFastLimit, optInSlowLimit)Examples
Compute the MESA Adaptive Moving Average from the latest K-lines.
javascript
function main() {
var records = exchange.GetRecords()
if (!records) return
var ret = talib.MAMA(records)
// Output: [MAMA array, FAMA array]
Log(ret)
}
python
import talib
def main():
records = exchange.GetRecords()
if not records:
return
ret = talib.MAMA(records.Close)
# Output: (MAMA array, FAMA array)
Log(ret)Returns
| Type | Description |
array | Two-dimensional array: [MAMA array, FAMA array] (a tuple in the same order in Python). |
Arguments
| Name | Type | Required | Description |
inReal |
| Yes | K-line array (close prices are used) or numeric array; in Python, pass a numeric array such as |
optInFastLimit | number | No | Fast limit. Default |
optInSlowLimit | number | No | Slow limit. Default |
See Also
Remarks
TA-Lib equivalent: MAMA(Records[Close],Fast Limit = 0.5,Slow Limit = 0.05) = [Array(outMAMA),Array(outFAMA)].