以下是CCI
指标调用范例代码,更多的talib指标函数可以查阅优宽量化交易平台API手册
function main() {
while(!exchange.IO("status")) {
Sleep(1000)
}
exchange.SetContractType("rb888")
var records = exchange.GetRecords()
var cci = talib.CCI(records, 14)
Log(cci)
}
import talib
def main():
while not exchange.IO("status"):
Sleep(1000)
exchange.SetContractType("rb888")
records = exchange.GetRecords()
# 14这个参数可以缺省
cci = talib.CCI(records.High, records.Low, records.Close, 14)
Log(cci)
void main() {
while(exchange.IO("status") == 0) {
Sleep(1000);
}
exchange.SetContractType("rb888");
auto records = exchange.GetRecords();
auto cci = talib.CCI(records, 14);
Log(cci);
}
TA指标库
JavaScript库