Gamestudio Links
Zorro Links
Newest Posts
A9
by 3run. 07/08/20 18:44
Historical ticks for Lookback backfill
by Zheka. 07/08/20 09:10
Trade Mode without a broker
by jj02520024. 07/08/20 01:20
How to handle algo name in Simulate.c
by happysun. 07/07/20 08:56
Erasing a datapoint in a plot array
by jcl. 07/06/20 09:51
typo
by jcl. 07/06/20 09:44
Video Panel System
by Emre. 07/06/20 09:39
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
7 registered members (3run, Quad, deus777, Ayumi, jenGs, kvm, hast29), 417 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
TraderKevin, deus777, carolthesecond, Roger399, vrindger
18474 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: 23
Coppell, TX
S
SteveG Offline
Newbie
SteveG  Offline
Newbie
S

Joined: Mar 2020
Posts: 23
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,256
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,256
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: 23
Coppell, TX
S
SteveG Offline
Newbie
SteveG  Offline
Newbie
S

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


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1