EA Programing => ปัญหาที่พบในการเขียน EA => Topic started by: peach on กุมภาพันธ์ 07, 2017, 06:02:32 pm

Title: compilewไม่ผ่าน"return' - expressions are not allowed on a global scope"
Post by: peach on กุมภาพันธ์ 07, 2017, 06:02:32 pm
compilewไม่ผ่าน"return' - expressions are not allowed on a global scope" ไม่รู้แก้ยังไงครับ


int CountOrder(int type){
   
     int CntOrder=0;
      for(int i= 0 ;<OrdersTotal();i++;
       OrderSelect(i,SELECT_BY_POS,MODE_TRADE);
       if(OrderType()== type && OrderMagicNumber() == MagicNumber){
         if(OrderSymbol() == Symbol()){
            CntOrder++;
            }
           
           }
        }
         
  return(CntOrder);
           
Title: Re: compilewไม่ผ่าน"return' - expressions are not allowed on a global scope"
Post by: admin on กุมภาพันธ์ 08, 2017, 03:10:03 pm
return มันอยู่นอก เครื่องหมาย }