在最后一根k线计算出前面N根k线可以画压力线和支撑线,如何倒回去前面N根k线画线?

在最后一根k线计算出前面N根k线可以画压力线和支撑线,如何倒回去前面N根k线画线?

Array<Numeric> x1Data;//压力线支撑线x

   Array<Numeric> y1Data;//压力线支撑线y

OnBar(ArrayRef<Integer> indexs)

{


if(BarStatus==2)

{

for i = 0 to length -1

{

Numeric low_1 = low[i];

Numeric low_2 = low[ iif(i>0 , i+1 , i)]

Numeric high_1 = high[i];

Numeric high_2 = high[ iif(i>0 , i+1 , i)];

Numeric index = CurrentBar-i;

Numeric top = boxSupAreaMap[1];

Numeric bot = boxSupAreaMap[3];

//找到压力线 xy

if (low_1 > top and low_2 <= top)

{

ArrayPushBack(x1Data,index);

ArrayPushBack(y1Data,low_2);

}


//找到支撑线 xy

if (high_1 < bot and high_2 >= bot)

{

 ArrayPushBack(x1Data,index);

 ArrayPushBack(y1Data,high_2);

}

 }

}

下面我如何画线????我已经找到了画线开始结束点xy并保存到x1Data和y1Data了。

}

如何求前面第5根K线到前面第20根K线的最高值与最低值
最后一根K线在收盘前交易
BarStatus() 可以判断第一根、中间、最后一根K线,我想在倒数第2根K线计算,如何判断?
如何从第一根K线开始画线
怎么判断当前K线是当前交易日的最后一根K线?
一根K线多信号
如何才能实现在下n根k线开仓呢
当根k线平仓后不开仓 下根K线开仓
请教下,突破均线后,第N根K线再开仓,该如何写
Params Numeric N(1); 如何标注O[N] 这根K线

https://tbq3.tbquant.net/helper?product_id=991&keyword=3794&content_id=2628&selectedkey=3855&type=article#3.1-line--%E7%BA%BF%E5%BD%A2

用3.1.3可以任意画图,横轴坐标是date+time