Will appreciate if anyone can provide me with simple code that will close a trade at the close of a timeframe e.g. at the end of the day or at the end of week before markets close.
Thanks in advance.
Thanks in advance.
How to code an EA to close a trade after so many hours 1 reply
Close positions at end of Day/Daily candle EA or indicator 6 replies
Problem with End-of-day-close code for MetaTrader 1 reply
Help - any tools that can easily convert MQL4 code to Easy Language code? 7 replies
Hidden Code in Code 12 replies
bool IsTimeToTrade() { bool OK = true; if (DayOfWeek() == 5 && TimeCurrent() >= StrToTime(TimeToStr(TimeCurrent(), TIME_DATE) + " " + FridayClose )) OK = false; if (TimeCurrent() >= StrToTime(TimeToStr(TimeCurrent(), TIME_DATE) + " " + TradeEndTime )) OK = false; return(OK); }