Please Help me How solve this....it cant draw LINE on the chart

 
 
 void vFCountBEP(int iCmd)
   {
      int i, iTotalOrders = OrdersTotal();
      double dOrderLots =0, dOrderPrice =0, dBEPPrice =0;
   
      for (i=1; i<=iTotalOrders; i++)
      {
         if (OrderSelect(i-1,SELECT_BY_POS,MODE_TRADES)==true)
            {
               if(OrderSymbol()==Symbol() && OrderMagicNumber()==EAMagicNo && OrderType()==iCmd)
                  {
                     dOrderLots  += OrderLots();
                     dOrderPrice += OrderLots() * OrderOpenPrice();
                  }
            }
      }
      dBEPPrice = dOrderPrice/dOrderLots;
      
      /// Create BEP line
         if (iCmd == OP_BUY)
            {
               if(ObjectFind(0,"BuyAverage")==0)     //if the buy line exist
                  ObjectMove(0,"BuyAverage",0,TimeCurrent(),dBEPPrice);
               else
                 {
                   // create the Buy Average Line
                   ObjectCreate(0,"BuyAverage",OBJ_HLINE,0,TimeCurrent(),dBEPPrice);
                   ObjectSet("BuyAverage",OBJPROP_COLOR,clrLightBlue);
                   ObjectSet("BuyAverage",OBJPROP_STYLE,STYLE_DOT);
                 }
            }
         else
               {
               if(ObjectFind(0,"SellAverage")==0)     //if the Sell line exist
                  ObjectMove(0,"SellAverage",0,TimeCurrent(),dBEPPrice);              
               
               else
                 {
                   // create the Sell Average Line
                  ObjectCreate(0,"SellAverage",OBJ_HLINE,0,TimeCurrent(),dBEPPrice);
                  ObjectSet("SellAverage",OBJPROP_COLOR,clrViolet);
                  ObjectSet("SellAverage",OBJPROP_STYLE,STYLE_DOT);
                 }
         
             }
   }        
 
You are trying to draw object to invalid price.

dBEPPrice = dOrderPrice/dOrderLots;
Print the price that you are trying to draw.
Reason: