whats wrong with this small function (*_*)..........

 
// catch value of bid if no order is opened.

double line_of_trades( )
  {
 static double the_line=0;  // save value btwn repeated calls.
    int total=OrdersTotal();
    
 if(total>0)
   {
   the_line=0;
    return(0);
    }
 
 if(total<1 && the_line>0)
  {
   Print("The Line is There");
   return(0);
  }
 
 if(total<1)
  {
   the_line=Bid;
   return(the_line);
  }
}
 
tafadzwa: whats wrong with this small function
Nothing, it just doesn't do what you think it should.