Quote:
Originally Posted by sonicdeejay
How can I write a code to make the EA not to trade during certain period (e.g 01:00 GMT 0 - 06:00 GMT 0), even there is a buy/sell signal??
sonic
|
bool IsTradeTime(int begin, int end){
if(begin < end){
if(Hour() >= begin && Hour() < end)return(true);
} else {
if(Hour() >= begin || Hour() < end)return(true);
}
return(false);
}