talib.MACDEXT()
函数用于计算MACD with controllable MA type (MA型可控 MACD)。
talib.MACDEXT()
函数的返回值为:二维数组。
array
talib.MACDEXT(inReal) talib.MACDEXT(inReal, optInFastPeriod) talib.MACDEXT(inReal, optInFastPeriod, optInFastMAType) talib.MACDEXT(inReal, optInFastPeriod, optInFastMAType, optInSlowPeriod) talib.MACDEXT(inReal, optInFastPeriod, optInFastMAType, optInSlowPeriod, optInSlowMAType) talib.MACDEXT(inReal, optInFastPeriod, optInFastMAType, optInSlowPeriod, optInSlowMAType, optInSignalPeriod) talib.MACDEXT(inReal, optInFastPeriod, optInFastMAType, optInSlowPeriod, optInSlowMAType, optInSignalPeriod, optInSignalMAType)
inReal
参数用于指定K线数据。
inReal
true
{@struct/Record Record}结构数组、数值数组
optInFastPeriod
参数用于设置快周期,默认值为12。
optInFastPeriod
false
number
optInFastMAType
参数用于设置快均线类型,默认值为0。
optInFastMAType
false
number
optInSlowPeriod
参数用于设置慢周期,默认值为26。
optInSlowPeriod
false
number
optInSlowMAType
参数用于设置慢均线类型,默认值为0。
optInSlowMAType
false
number
optInSignalPeriod
参数用于设置信号周期,默认值为9。
optInSignalPeriod
false
number
optInSignalMAType
参数用于设置信号均线类型,默认值为0。
optInSignalMAType
false
number
function main() {
var records = exchange.GetRecords()
var ret = talib.MACDEXT(records)
Log(ret)
}
import talib
def main():
records = exchange.GetRecords()
ret = talib.MACDEXT(records.Close)
Log(ret)
void main() {
auto records = exchange.GetRecords();
auto ret = talib.MACDEXT(records);
Log(ret);
}
MACDEXT()
函数在talib库文档中的描述为:MACDEXT(Records[Close],Fast Period = 12,Fast MA = 0,Slow Period = 26,Slow MA = 0,Signal Period = 9,Signal MA = 0) = [Array(outMACD),Array(outMACDSignal),Array(outMACDHist)]