求助数组问题

 

double BUYA[];int aa =0;
for(int n=OrdersTotal()-1;n>=0;n--)
{
if(OrderSelect(n, SELECT_BY_POS, MODE_TRADES)==false)break;
if(OrderType()==OP_SELL || OrderType()==OP_SELLSTOP)
{
BUYA[aa]=OrderOpenPrice();
aa++;
}
}
Print(BUYA[0]); print出来的值为0;

交易列表有定单,为什么 BUYA[aa]=OrderOpenPrice();这里不能赋值给数组呢?

原因: