Vars
Array<Numeric> sc_array[30]
Numeric p1;
Series<Numeric> MA30;
Series<Numeric> MA60;
OnBar(ArrayRef<Integer> indexs)
{
MA30=SMA(CLOSE,60,1);
MA60=SMA(CLOSE,120,1);
p1=0;
For j0= 0 to 20000
{
IF(ma30[j0]<ma60[j0] && ma30[j0+1]>ma60[j0+1] )
{
sc_array[p1]=j0;
p1=p1+1;
}
}
Commentary("sc_array="+TextArray(sc_array));
}
请教一下,for循环计算图标内ma30和ma60死叉数量,并赋值给一维数组,为什么计算到10000根K线以后就没有数值了?