Hi..
I need to stop my order opening on Fridays. and i tried to get day from DayOfWeek function. its working with one broker and for other every day returning 0. can someone help me on this.
int DA=DayOfWeek();
(0-Sunday,1,2,3,4,5,6)
Then try the 2nd variant of TimeCurrent() instead. Then see if the MqlDateTime structure contains the right value.

- docs.mql4.com
Then try the 2nd variant of TimeCurrent() instead. Then see if the MqlDateTime structure contains the right value.
Hi Seng
thanks for your comment, i am new for MQL. can you describe this in detail or can you give sample code of this.
Hi Seng
thanks for your comment, i am new for MQL. can you describe this in detail or can you give sample code of this.
See if '1' and '2' below produce the same output:
// 1 Print ("DayOfWeek() = ", DayOfWeek()); // 2 MqlDateTime dt; TimeCurrent(dt); Print ("dt.day_of_week = ", dt.day_of_week);
Where are you calling it?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi..
I need to stop my order opening on Fridays. and i tried to get day from DayOfWeek function. its working with one broker and for other every day returning 0. can someone help me on this.
int DA=DayOfWeek();
(0-Sunday,1,2,3,4,5,6)