How to get MAMA (mesa moving average) to work with BBands

Posted By: RTG

How to get MAMA (mesa moving average) to work with BBands - 03/15/15 11:41

I have the following function;

BBands(Price,100,2,2,MAType_MAMA);
Which results in the following compiler error.

Error 011: Function BBANDS called with invalid data
BBands called with wrong paramters.

BBands works when MAMA is replaced with SMA,EMA, and most of the other predefined moving averages.

So MAMA needs to be setup initially, but how?


Posted By: jcl

Re: How to get MAMA (mesa moving average) to work with BBands - 03/16/15 16:18

I believe the problem is the time period: MAType_MAMA does not accept too long periods in the ta-lib, don't ask me why. This MA Type makes anyway not much sense to me because MAMA requires two time periods, not one.

You could write an own BBand function that directly uses the MAMA for overcoming this limit.
© 2024 lite-C Forums