The talib.CMO()
function is used to calculate the Chande Momentum Oscillator (CMO).
The return value of the talib.CMO()
function is: a one-dimensional array.
array
talib.CMO(inReal) talib.CMO(inReal, optInTimePeriod)
The inReal
parameter is used to specify the K-line data.
inReal
true
{@struct/Record Record} structure arrays, numeric arrays
The optInTimePeriod
parameter is used to set the period, the default value is 14.
optInTimePeriod
false
number
function main() {
var records = exchange.GetRecords()
var ret = talib.CMO(records)
Log(ret)
}
import talib
def main():
records = exchange.GetRecords()
ret = talib.CMO(records.Close)
Log(ret)
void main() {
auto records = exchange.GetRecords();
auto ret = talib.CMO(records);
Log(ret);
}
The CMO()
function is described in the talib library documentation as: CMO(Records[Close],Time Period = 14) = Array(outReal)