The TA
indicator library of FMZ Quant Trading Platform has optimized the commonly-used indicator algorithms to support the call of strategies written in JavaScript
, Python
and C++
.
open source TA library code, API Manual of FMZ Quant Trading Platform.
function main(){
// The length of records, when the length does not meet the parameter calculation requirements of indicator function, an invalid value will be returned
var records = exchange.GetRecords()
var macd = TA.MACD(records)
var atr = TA.ATR(records, 14)
// Print out the last set of indicator values
Log(macd[0][records.length-1], macd[1][records.length-1], macd[2][records.length-1])
Log(atr[atr.length-1])
}
def main():
r = exchange.GetRecords()
macd = TA.MACD(r)
atr = TA.ATR(r, 14)
Log(macd[0][-1], macd[1][-1], macd[2][-1])
Log(atr[-1])
void main() {
auto r = exchange.GetRecords();
auto macd = TA.MACD(r);
auto atr = TA.ATR(r, 14);
Log(macd[0][macd[0].size() - 1], macd[1][macd[1].size() - 1], macd[2][macd[2].size() - 1]);
Log(atr[atr.size() - 1]);
}
Web3
talib Indicator Library