求周期为60天振幅的倒数第2个前低距离今天多少天结果可能有误?

我想求周期为60天振幅的第2个前低距离今天多少天,用如下公式对吗?我测试结果有些问题?复现代码如下:

    OnBarOpen(ArrayRef<Integer> indexs)
    {

                ema60 = XAverage(TrueRange,60);
                ema60 = XAverage(ema60,15);//平滑
                lopoint60= ema60[1] > ema60[2] and ema60[2] <= ema60[3];
                Nth_lo60_2 = NthCon(lopoint60,2);
                Nth_lo60_1 = NthCon(lopoint60,1);
                PlotBool("lopoint60=", lopoint60,c,green);
                PlotNumeric("Nth_lo60_2=", Nth_lo60_2,c,Red);
                PlotNumeric("Nth_lo60_1=", Nth_lo60_1,c,Red);

}

我用NtheCon(con,N), N=1在图层看没问题,但在N=2时有问题,值在很长一段时间是不变的?

求前10天到前20天之间最低价用什么函数
5天前的当天,再求它前10天内的最高价
请问前复权的888合约可能价格为负数吗?
跨周期的K线图上计算当前bar是今天的第几根bar,输出的结果不对
如何求N小时前的收盘价
前一个周期的五周期线怎么求
求助:怎么求不包含当前K线的前N个周期的最大值?
求8天内的最低价
求特定周期的周高价
如何求出前20根K线中最高价出现时距离当前bar的数量

已经解决,谢谢