Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 600 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Oanda MT4-Bridge V20-API history and hedging #477861
08/05/19 17:04
08/05/19 17:04
Joined: Jan 2019
Posts: 73
berlin
L
laz Offline OP
Junior Member
laz  Offline OP
Junior Member
L

Joined: Jan 2019
Posts: 73
berlin
Hi guys, after I have trained/tested only with the *.t6 data from the Zorro download page I want to test my system now on a demo account. To TRAIN, TEST and TRADE on the same data I decided to go with Oanda, because they offer a lot of historical data. I have created a new, empty history folder under Zorro-History-Oanda and changed the entry in ZorroFix.ini.

As far as I understand, you can connect Zorro with Oanda in 2 ways:
MTR4-Bridge or V20-API
Quote
BarPeriod = 60;
LookBack = 220;
Now, when I try to download historical data through the MTR4-Bridge, only a few records (4881 M1 data records / 60 = 81.35 hours) are downloaded.

The little data available on the MTR4-Bridge is explained here: https://zorro-project.com/manual/en/mt4plugin.htm
Quote
Some MTR4/5 servers have no sufficient price history for systems with a long lookback period, such as Z1, Z2, or Z12 - especially when starting after a holiday. The strategy will then not start, and a Error 047 message is displayed. In that case use the PRELOAD flag or the Preload .ini setup for using Zorro's own history instead of the Meta Trader server.

Ok, so for now i have used the V20-API to download the last 5 years of historical M1 data. My system uses Hedging (Zorro Free), so I created a V20-MT4-HEDGING subaccount at OANDA. Since I need hedging - I wanted to trade over the MTR4-Bridge for now.

Now I have the following questions:

1. PRELOAD not set : Which price data does Zorro load after clicking on "TRADE" on a connection via MTR4-Bridge and where from? Oanda data from OANDA-MT4-SERVER, from MT4 *.hst files or Metaquotes? Does it make sense to collect M1 data in *.hst files to get more history for Zorro?

2. PRELOAD not set : Zorro downloads the price data from the Broker/Api/Bridge. If there is not enough M1 data, Zorro uses higher timeframes? If Zorro is connected via MTR4-Bridge, Zorro downloads M15 data (instead 1 Minute) after clicking on "TRADE", does that happen because too little M1 data is available? Why 15 Minutes? How does Zorro handle the situation if the gap is bigger then the amount of M1 data?

3. Is it somehow possible to use only the V20 API and hedging with Zorro Free?

4. "The Oanda V20 API does not return rollover rates, so swap and commission must be located on the Oanda website and manually entered in the asset list." Does the MTR4-Bridge return correct rollover rates?

5. In some examples (A,B) you can see that they download/refresh historical data (via assetHistory()) in the script, in some they do not (C). When do you have to use assetHistory(), when not?

6. I would now proceed as follows: I would update all data through the V20-API until today. Then I would do the trading via the MTR4-Bridge (to be able to hedge), set PRELOAD and use assetHistory to store the newest data. Is that correct?

Last edited by laz; 08/05/19 19:09.
Re: Oanda MT4-Bridge V20-API history and hedging [Re: laz] #480348
06/02/20 00:40
06/02/20 00:40
Joined: Mar 2020
Posts: 24
Coppell, TX
S
SteveG Offline
Newbie
SteveG  Offline
Newbie
S

Joined: Mar 2020
Posts: 24
Coppell, TX
I know this is an old post. Was there ever an answer to the OP questions?

Once you have data in the files, how is it updated / appended with real time data?

I just opened an Oanda account today.

Thanks

Re: Oanda MT4-Bridge V20-API history and hedging [Re: laz] #480353
06/02/20 09:42
06/02/20 09:42
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
When you connect to the Oanda API, you get historical data from the Oanda API. When you connect to MT4, you get historical data from MT4.

When PRELOAD is set, you get historical data from your previously loaded history. If that data is not sufficient to fill the lookback period, you get the remaining data from your connected broker.

https://manual.zorro-project.com/mode.htm

Re: Oanda MT4-Bridge V20-API history and hedging [Re: laz] #480391
06/03/20 22:40
06/03/20 22:40
Joined: Mar 2020
Posts: 24
Coppell, TX
S
SteveG Offline
Newbie
SteveG  Offline
Newbie
S

Joined: Mar 2020
Posts: 24
Coppell, TX
Thank you ... I will keep reading


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1