Thanks for all your efforts, folks. I can see you'all are pretty hardcore and careful about details. So, I appreciate that. I like the idea of just counting minute-bars (my EA only uses minutes) - seems simple for me, but I am now concerned if too many are missed. Does anyone have any idea how many minute-ticks are missed in say, first opening hours of the week? (slowest activity in my experience)
The number of "missing" bars varies by broker. An STP or ECN broker will have somewhere between none and a small number per week. A B-book broker may have quite a few, generally overnight (in GMT terms).
You can count the number of bars by taking an order's OrderOpenTime() and looking up the corresponding bar index using iBarShift().
The number of "missing" bars varies by broker. An STP or ECN broker will have somewhere between none and a small number per week. A B-book broker may have quite a few, generally overnight (in GMT terms).
You can count the number of bars by taking an order's OrderOpenTime() and looking up the corresponding bar index using iBarShift().
Depending on how long you want the order to stay, use larger bars like H1 in the iBarShift(). Alternatively count the missing bars like "Free-of-Holes" Charts - MQL4 Articles
int Weekends = (lElapsedTime / 604800);
int lDoWStart = TimeDayOfWeek(dtStartTime);
int lDoWEnd = TimeDayOfWeek(dtEndTime);
Besides weekends there are holidays where some brokers will be closed. Christmas is mostly all closed while US brokers close for July 4.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Thanks for all your efforts, folks. I can see you'all are pretty hardcore and careful about details. So, I appreciate that. I like the idea of just counting minute-bars (my EA only uses minutes) - seems simple for me, but I am now concerned if too many are missed. Does anyone have any idea how many minute-ticks are missed in say, first opening hours of the week? (slowest activity in my experience)
The number of "missing" bars varies by broker. An STP or ECN broker will have somewhere between none and a small number per week. A B-book broker may have quite a few, generally overnight (in GMT terms).
You can count the number of bars by taking an order's OrderOpenTime() and looking up the corresponding bar index using iBarShift().
The number of "missing" bars varies by broker. An STP or ECN broker will have somewhere between none and a small number per week. A B-book broker may have quite a few, generally overnight (in GMT terms).
You can count the number of bars by taking an order's OrderOpenTime() and looking up the corresponding bar index using iBarShift().