數組之前的元素被清零?
作者:開拓者 TB 來源:cxh99.com 發布時間:2016年11月05日
- 咨詢內容:
我想問下數組的問題,為什么這段代碼中,數組之前的元素被清零?謝謝!
Params
Vars
NumericArray HiLoPoint;
NumericSeries IdxHiLoPoint(0);
Begin
if (high[1]>high[2] and high[1]>high)
{
NumericArrayInsert(HiLoPoint,IdxHiLoPoint,High[1]);
Commentary("HiLoPoint="+Text(HiLoPoint[0]));
Commentary("HiLoPoint="+Text(HiLoPoint[1]));
Commentary("HiLoPoint="+Text(HiLoPoint[2]));
IdxHiLoPoint=IdxHiLoPoint+1;
}
end
- TB技術人員:
因為TB的數組并不是序列數據。象這種需要保留下來的,建議使用全局變量來實現。