在当前bar计算出在当前bar前面的第三根bar是最低点,如何在当前bar的前面第三根bar标出文字

在当前bar(最后一根bar)计算出在当前bar前面的第三根bar是最低点,如何在当前bar的前面第三根bar  low位置标出文字?下面代码

回溯找到最低点或最高点以后,如何在找到bar山重新显示?貌似当前bar是不能渲染之前的历史bar了。

OnBar(ArrayRef<Integer> indexs)

{

            showBottomIndex=-1;

             showTopIndex=-1;

            if(BarStatus==2)

           {

                      for i = 0 to length -1//回溯N跟 bar

      {

                                  xxxxxxxxxxxxxxxxxxxxxxxxxxxx

                                  xxxxxxxxxxxxxxxxxxxxxxxx

                                 index = CurrentBar -i ;

                              if (low_1 > top and low_2 <= top)

                                 {

                                  showBottomIndex=index;//显示最低点bar找到了

                                 }

                                 

                                   if (high_1 < bot and high_2 >= bot)

                                   {

                                    showTopIndex=index;  //显示最高点bar找到了

                                   }

                     }

              }


         

             if (showBottomIndex  >0  and  (BarCount- CurrentBar) ==showBottomIndex   )

             {

                    plt1.text("letter1",LOw,"▲");

              }

          if (showTopIndex>0  and  (BarCount- CurrentBar) ==showTopIndex  )

          {

              plt1.text("letter1",high,"▼");

          }


}

跨周期的K线图上计算当前bar是今天的第几根bar,输出的结果不对
当前bar程序未执行完毕,下一根bar直接就打断了当前程序的执行,如何解决。
如何求出前20根K线中最高价出现时距离当前bar的数量
满足条件后,当前bar的低点
收盘前最后一根bar的time怎么计算?
求助 当前bar结束前多少秒是哪个函数?
AvgTrueRang(5)是过去5根bar吗?是否当前bar?
如何判断当前的bar周期是分钟还是日线呢?
AverageFC(price, length)计算时是否包含当前bar?
AverageFC(price, length)计算时是否包含当前bar?

当根bar是最低就标记,不要从未来往前面画