Posted By: Zheka
Gaps when downloading prices in [Trade] mode - 03/19/18 17:58
Hi, All,
when [Trade] is turned on, Zorro is downloading price history from the broker, needed to cover the LookBack period.
However, say, in 50% of the time, it would not download the most recent/front 1-10 bars.
I get this when LookBack=5600 5-min Bars (and more than 3/4 of these exist in the database and pre-loaded), connecting to an MT4 broker.
IS this a common experience with MT4?
To guarantee that all data exists for pre-calculation, I use the below snippet to warn me of missing bars:
I believe Zorro's MT4 plug-in can be improved to handle situations like this and re-request the data if missing.
when [Trade] is turned on, Zorro is downloading price history from the broker, needed to cover the LookBack period.
However, say, in 50% of the time, it would not download the most recent/front 1-10 bars.
I get this when LookBack=5600 5-min Bars (and more than 3/4 of these exist in the database and pre-loaded), connecting to an MT4 broker.
IS this a common experience with MT4?
To guarantee that all data exists for pre-calculation, I use the below snippet to warn me of missing bars:
Quote:
float tdiff;
if (is(TRADEMODE) && Bar>=StartBar-1)
{
tdiff=(wdate(NOW)-wdate(0))*(24*60);
if (tdiff>BarPeriod)
msg("# MISSING %.1f BARS!", tdiff/BarPeriod);
}
if (is(TRADEMODE) && Bar>=StartBar-1)
{
tdiff=(wdate(NOW)-wdate(0))*(24*60);
if (tdiff>BarPeriod)
msg("# MISSING %.1f BARS!", tdiff/BarPeriod);
}
I believe Zorro's MT4 plug-in can be improved to handle situations like this and re-request the data if missing.