资源加载中... loading...

TA.Alligator

TA.Alligator()函数用于计算鳄鱼线指标

TA.Alligator()函数的返回值为二维数组,结构为:[jawLine, teethLine, lipsLine]。 array

TA.Alligator(inReal) TA.Alligator(inReal, jawLength, teethLength, lipsLength)

inReal参数用于指定K线数据。 inReal true {@struct/Record Record}结构数组、数值数组 jawLength参数用于设置下颚周期。 jawLength false number teethLength参数用于设置牙齿周期。 teethLength false number lipsLength参数用于设置上唇周期。 lipsLength false number

function main(){
    var records = exchange.GetRecords()
    var alligator = TA.Alligator(records)
    Log("jawLine:", alligator[0])
    Log("teethLine:", alligator[1])
    Log("lipsLine:", alligator[2])
}
def main():
    records = exchange.GetRecords()
    alligator = TA.Alligator(records)
    Log("jawLine:", alligator[0])
    Log("teethLine:", alligator[1])
    Log("lipsLine:", alligator[2])
void main() {
    auto records = exchange.GetRecords();
    auto alligator = TA.Alligator(records);
    Log("jawLine:", alligator[0]);
    Log("teethLine:", alligator[1]);
    Log("lipsLine:", alligator[2]);
}

测试TA.Alligator()函数:

TA.Alligator()函数的jawLengthteethLengthlipsLength参数的默认值为:1385

{@fun/TA/TA.MACD TA.MACD}, {@fun/TA/TA.KDJ TA.KDJ}, {@fun/TA/TA.RSI TA.RSI}, {@fun/TA/TA.ATR TA.ATR}, {@fun/TA/TA.OBV TA.OBV}, {@fun/TA/TA.MA TA.MA}, {@fun/TA/TA.EMA TA.EMA}, {@fun/TA/TA.BOLL TA.BOLL}, {@fun/TA/TA.CMF TA.CMF}, {@fun/TA/TA.Highest TA.Highest}, {@fun/TA/TA.Lowest TA.Lowest}

TA.BOLL TA.CMF