Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 4 Libraries | Time Filter Library

MetaTrader Experts, Indicators, Scripts and Libraries

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.
11533

Best MetaTrader Indicators + Profitable Expert Advisors