The talib.TRIMA()
function is used to calculate the Triangular Moving Average (tri-exponential moving average).
The return value of the talib.TRIMA()
function is a one-dimensional array.
array
talib.TRIMA(inReal) talib.TRIMA(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 30.
optInTimePeriod
false
number
function main() {
var records = exchange.GetRecords()
var ret = talib.TRIMA(records)
Log(ret)
}
import talib
def main():
records = exchange.GetRecords()
ret = talib.TRIMA(records.Close)
Log(ret)
void main() {
auto records = exchange.GetRecords();
auto ret = talib.TRIMA(records);
Log(ret);
}
The TRIMA()
function is described in the talib library documentation as: TRIMA(Records[Close],Time Period = 30) = Array(outReal)