Time Filter Library – library MetaTrader 4

The function will filter the trade positon. If the current time in the time you set, the function will return true.

Usage:

extern string   TimeStart="12:00";
extern string   TimeStop="14:00"; 

bool TradeAlow=sTimeFilter(TimeStart,TimeStop);

if(TradeAllow==true)
{
//Put your trade function here
//OrderSend(...); 
} 

//Ea will open position bettween 12:00 ---> 14:00
//If you set start=20:00, stop=08:00----> ea will start trade from 20:00 of today to 8:00 tomorrow.
📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks
Alternative:   Candle Movement Monitoring - indicator MetaTrader 4