指标出现数组越界,并且ima,ibands都是0
我下面的代码为什么会出现数组越界,并且ima和ibands都是0.0。
void OnStart()
{
int file_open = FileOpen("EURUSD.csv",FILE_READ|FILE_WRITE|FILE_CSV,',',CP_ACP);
Print(Bars);
int i;
for(i=Bars;i>=0;i--)
{
double bull = iBands(NULL,0,20,2,i,PRICE_CLOSE,0,i);
double ma_shao = iMA(NULL,0,5,8,MODE_SMA,PRICE_CLOSE,i);
FileWrite(file_open,Open,Close,High,bull,ma_shao);
}
{:1_186:} {:1_179:} {:1_186:}
页:
[1]