求助! 代码修改问题

 

求助! Ichimoku修改代码后,价格变动,Ichimoku,却不变,求高手解答,

这是原有的

//---- Senkou Span B
i=Bars-Senkou;
if(counted_bars>Senkou) i=Bars-counted_bars-1;
while(i>=0)
{
high=High[i]; low=Low[i]; k=i-1+Senkou;
while(k>=i)
{
price=High[k];
if(high<price) high=price;
price=Low[k];
if(low>price) low=price;
k--;
}
price=(high+low)/2;
SpanB_Buffer[i]=price;
SpanB2_Buffer[i]=price;
i--;
}

我想去掉前移的那部分,还不改变Senkou Span B的数值,

这是我修改后的,

//---- Senkou Span B
i=Bars-Senkou;
if(counted_bars>Senkou) i=Bars-counted_bars-1;
while(i>=0)
{
high=High[i]; low=Low[i]; k=i-1+Senkou;
while(k>=i)
{
price=High[k];
if(high<price) high=price;
price=Low[k];
if(low>price) low=price;
k--;
}
price=(high+low)/2;
SpanB_Buffer[i-Kijun]=price;
SpanB2_Buffer[i-Kijun]=price;
i--;
}

可是价格变动后,SenkouSpan B 却不做相应的改变,求高手赐教!