TA.Alligator
计算鳄鱼线指标。
TA.Alligator(inReal)
TA.Alligator(inReal, jawLength, teethLength, lipsLength)示例
测试TA.Alligator()函数:
javascript
function main(){
var records = exchange.GetRecords()
var alligator = TA.Alligator(records)
Log("jawLine:", alligator[0])
Log("teethLine:", alligator[1])
Log("lipsLine:", alligator[2])
}
python
def main():
records = exchange.GetRecords()
alligator = TA.Alligator(records)
Log("jawLine:", alligator[0])
Log("teethLine:", alligator[1])
Log("lipsLine:", alligator[2])
rust
fn main() {
let records = exchange.GetRecords(None, None, None).unwrap();
let alligator = TA.Alligator(&records, None, None, None);
Log!("jawLine:", alligator[0]);
Log!("teethLine:", alligator[1]);
Log!("lipsLine:", alligator[2]);
}返回值
| 类型 | 描述 |
array | 二维数组,其结构为: |
参数
| 名称 | 类型 | 必填 | 描述 |
inReal |
| 是 | K线数据。 |
jawLength | number | 否 | 下颚线周期。 |
teethLength | number | 否 | 牙齿线周期。 |
lipsLength | number | 否 | 上唇线周期。 |
参考
备注
TA.Alligator()函数的jawLength、teethLength、lipsLength参数的默认值分别为:13、8、5。