Download MetaTrader 5

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

To add comments, please log in or register
tafadzwa
117
tafadzwa  
// 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);
  }
}
whroeder1
15015
whroeder1  
tafadzwa: whats wrong with this small function
Nothing, it just doesn't do what you think it should.
To add comments, please log in or register