buy or sell and volume

 
need a help

I need the following code.

When candle is in daily up and volume is greater than 50000 is made a buy

When candle is down and daily volume is greater than 50000 is made a sell

grateful
 
 


Help

int start(){

if (last_bar == Bars) return(0);
last_bar = Bars;
double Volumes;


if (OrdersTotal() == 0 && Volumes >5000){

{
// if(Close[0]>Open[0])return(0);

}
OrderSend(Symbol(), OP_BUY, lots,Ask, 3, Ask - stop_loss * Point, Bid + take_profit * Point, IDENT, MAGIC, 0, Blue);
{
// if(Close[0]<Open[0])return(0);
OrderSend(Symbol(), OP_SELL, lots,Bid, 3, Bid + stop_loss * Point, Ask - take_profit * Point, IDENT, MAGIC, 0, Red);
}
}
return(0);
}
Reason: