U can use my Function
i want close all my open order in Hour 3 and 15 Minute and cek for 1 minute broker time
the code is
bool myCloseTradingTime(string StartTimeCek,string StopTimeCek,int GMT_Offset=0){ bool UseTimeLocal=False; if(GMT_Offset==99){UseTimeLocal=True;GMT_Offset=0;} datetime start0, stop0, start1, stop1; start0 = StrToTime(StringConcatenate(Year(),".",Month(),".",Day()," ",StartTimeCek))+GMT_Offset*3600; stop0 = StrToTime(StringConcatenate(Year(),".",Month(),".",Day()," ",StopTimeCek))+GMT_Offset*3600; start1=start0;stop1=stop0; if(stop0<=start0){stop1+=86400;start0-=86400;} if((((TimeCurrent()>=start0&&TimeCurrent()<stop0)||(TimeCurrent()>=start1&&TimeCurrent()<stop1))&&UseTimeLocal==False)|| (((TimeLocal()>=start0&&TimeLocal()<stop0)||(TimeLocal()>=start1&&TimeLocal()<stop1))&&UseTimeLocal==True)){return(true);} return(false);}exp to use
i want close all my open order in Hour 3 and 15 Minute and cek for 1 minute broker time
the code is
myCloseTradingTime("03:15:00","03:15:59",0);
houseofmiracle: How to insert SRC? I can't find SRC menu
When you post code please use the CODE button (Alt-S)!
(For large amounts of code, attach it.) Please edit your (original) post.
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor
@whroeder1 : Sorry, I can't edit my post, is only "to pocket" and "reply"
@Abi Manyu : Thank you for your help, is it close on the same day? What part need to change for close on next day / certain day?
houseofmiracle:
@whroeder1 : Sorry, I can't edit my post, is only "to pocket" and "reply"
@Abi Manyu : Thank you for your help, is it close on the same day? What part need to change for close on next day / certain day?
I edited it for you.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I want to close order on next day certain time, I have a mql4 files which close on the same day certain time.
Which part I must change? How to change to next day certain time. Thank you
How to insert SRC? I can't find SRC menu