文华中的三角移动平均函数

文华中的这个函数在TB中应该怎么写?

样本标准差、平滑移动平均怎么求?
考夫曼自适应移动平均线
适应性移动平均线指标
tbquant1.3.4.5版本移动平均线计算问题
请教,计算N个Bar前的移动平均线怎么编写代码
开拓者连续穿越10天移动平均线怎么写?
【智大领峰-指标-K线】起点三角
文华中K线数据向前引用REF,咱们有吗?
文华中valuewhen函数在TBQ中如何实现?
移动止损的条件

Params
    Numeric length(30);
Vars
    NumericSeries ma_half;
    NumericSeries tram;
Begin
    ma_half= Average(Close,length);
    tram=Average(ma_half,length);
    PlotNumeric("tram",tram);
    Commentary("tram="+text(tram));
End

参数可以自行更改,简单写的,如有不对请指正。

 

好的 谢谢

ma_half = average(close,length1);

trma = average(ma_half,length2);

基本没什么区别

我也是这样写的但是和文华的数据对不上