History download issues with MT bridge

Posted By: Mishiwaka

History download issues with MT bridge - 06/02/23 21:02

Hello everyone,
I have an issue with downloading the history/data from MT4/5 bridge, I have code like in examples

assetHistory("GBP/JPY",1);
assetAdd("GBP/JPY");
asset("GBP/JPY");

bit when it tests or trains after it downloads history partially, I have an error
Error 047: GBP/JPY got 3, need 2001 bars

and

Load GBP/JPY 2023 99999 min (gap 57 days)
Load GBP/JPY 2022 300 min (gap 364 days)
and so on

Is it Zorro's internal limitation for the free version?
Posted By: Mishiwaka

Re: History download issues with MT bridge - 06/02/23 21:04

Actually, all pair apart from EUR/USD do the same
Posted By: alun

Re: History download issues with MT bridge - 06/03/23 12:01

I don't think it supposed to download history from a broker connector.

That explains why you don't see the issue with EUR/USD - because it is bundled with the distribution.

I've used my own script to extract Forex/CFD data from JForex (Dukascopy) https://gist.github.com/alun/79c4a633c72ea91ec338a7d66c5ab496

But I believe there could be better ways.
Posted By: alun

Re: History download issues with MT bridge - 06/03/23 12:10

Maybe Download / DownloadEOD scripts can help to get the history from a broker.
Posted By: Mishiwaka

Re: History download issues with MT bridge - 06/03/23 13:28

Thx for the reply. I found out that if it will be in mode four, it works. At least for BarPeriod = 60. Maybe someone will find it useful.
As I see it the problem is that you can download a limited amount of bars history from a broker, looks like 10 000 or something like this. So on a bridge, you need to specify LookBack and training period to get historical data strictly to necessary or available period.
I wrote the simplest script to get data from a broker, it needs to run apart, as far as also, there are limited amounts of downloads from the bridge. First successful and next time errors. The script is like this.

function run()
{
vars asset_name = "GBP/JPY";
LookBack = 5000;
BarPeriod = 60;
assetHistory(asset_name,4);
assetAdd(asset_name);
asset(asset_name);
StartDate = 2011;
EndDate = 2022;
}
Posted By: Mishiwaka

Re: History download issues with MT bridge - 06/03/23 17:56

More correct

assetList("AssetsCur.csv");
vars asset_name = "GBP/JPY";
LookBack = 5000;
BarPeriod = 30;
StartDate = 2011;
EndDate = 2022;
assetHistory(asset_name,4);
assetAdd(asset_name);
asset(asset_name);
Posted By: alun

Re: History download issues with MT bridge - 06/03/23 18:04

Ah nice, thanks for sharing looks like 4 should work with any broker https://zorro-project.com/manual/en/loadhistory.htm

will keep it in mind.

DukasCopy history is free and quite deep - I've loaded since 2000 for a variety of instruments used to backtest Z-strategies.
Posted By: Mishiwaka

Re: History download issues with MT bridge - 06/03/23 20:46

Just curious what editor or compiler is that?

Attached File
installation.png  (19 downloads)
Posted By: alun

Re: History download issues with MT bridge - 06/05/23 10:11

Originally Posted by Mishiwaka
Just curious what editor or compiler is that?


It's JForex 3 Dukascopy bespoke terminal
Posted By: Mishiwaka

Re: History download issues with MT bridge - 06/05/23 10:16

Thx.
© 2024 lite-C Forums