MT5中怎样读取某个品种的买一量?

 
MT5可以读取某个品种的买一量吗?
 
bhqt:
MT5可以读取某个品种的买一量吗?

MarketBookGet

 
Xiaoyu Huang #:
MarketBookGet

   MqlBookInfo priceArray[];

   bool getBook=MarketBookGet(NULL,priceArray);

   if(getBook)

     {

      int size=ArraySize(priceArray);

      Print("MarketBookInfo for ",symbol);

      for(int i=0; i<size; i++)

        {

         Print(string(i)+":",string(priceArray[i].price)

               +"    Volume = "+string(priceArray[i].volume),

               " type = ",priceArray[i].type);

        }

     }

   else

     {

      Print("Could not get contents of the symbol DOM ",symbol);

     }

  }


运行的结果为什么是:

2023.09.02 13:24:45.663 Could not get contents of the symbol DOM BRENT_OIL   ???

原因: