Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (degenerate_762), 1,098 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 6 1 2 3 4 5 6
Re: Multiple broker connection - beta testers wanted! [Re: jcl] #470373
01/10/18 16:55
01/10/18 16:55
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
I use 1.74.3 - is it stil in beta? -> 'Zorro 1.74 (released December 2017)'. Update: I saw on download page that 1.74.3 is in RC.

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #470389
01/11/18 12:11
01/11/18 12:11
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
The latest version is 1.74.5 at http://opserver.de/down/Zorro_1744.exe. In this version the brokerarb problem is supposedly fixed.

Re: Multiple broker connection - beta testers wanted! [Re: jcl] #470428
01/14/18 11:59
01/14/18 11:59
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
I fear it was not or not completely. But the differences have been moved to PriceA/Asset_A compared to the previous version and sometimes the values are equal.

Code:
V 1.745 on Sun 18-01-14 11:43:05
Test: BA_BTC_A_B  (TICKS) 2018
Assets AssetsArb.csv
PriceA: 13842.00000, PriceB: 14353.00000, Difference: -511.00000
[Asset_A::L0101] Long 10@13405.00000  at 00:00:01
[Asset_B::S0102] Short 1@14353.00000  at 00:00:01

[1: Tue 18-01-02 01:00:00] 0000 -93.73 1/1  (14353.00)
[2: Tue 18-01-02 02:00:00] 0000 +421 2/0  (13719.20)

PriceA: 13592.00000, PriceB: 13591.50000, Difference: 0.50000
[Asset_A::L0101] Sell 10@13592.00: +12.40 at 02:52:58
[Asset_B::S0102] Cover 1@13591.40: +509 at 02:52:58

[3: Tue 18-01-02 03:00:00] 522 0 2/0  (13605.60)
[4: Tue 18-01-02 04:00:00] 522 0 2/0  (13412.70)

PriceA: 13071.00000, PriceB: 13412.70020, Difference: -341.70020
[Asset_A::L0501] Long 10@13343.00000  at 04:00:01
[Asset_B::S0502] Short 1@13412.70020  at 04:00:01

[5: Tue 18-01-02 05:00:00] 522 +10.27 3/1  (13204.70)
[6: Tue 18-01-02 06:00:00] 522 -8.10 3/1  (13231.90)

PriceA: 13293.00000, PriceB: 13231.90039, Difference: 61.09961
[Asset_A::L0501] Sell 10@13116.00: -29.00 at 06:00:01
[Asset_B::S0502] Cover 1@13231.90: +20.90 at 06:00:01

[...]
[18: Tue 18-01-02 18:00:00] 514 0 3/1  (13964.50)

PriceA: 14648.00000, PriceB: 13964.40039, Difference: 683.59961
[Asset_A::S1901] Short 10@13914.00000  at 18:00:01
[Asset_B::L1902] Long 1@13964.40039  at 18:00:01

PriceA: 13914.00000, PriceB: 13964.50000, Difference: -50.50000
[Asset_A::S1901] Cover 10@13914.00: -6.30 at 18:00:01
[Asset_B::L1902] Sell 1@13964.90: -131 at 18:00:01

(Broker B has changed its minimum trade size to 0.1, so lot factor for Broker A is now 10)


Especially the last trade seemed very strange, Price_A had fallen from 14648 to 13914 within a second? So I asked ZHistoryEditor about Asset_A.t1 and found:

Code:
2018.01.02 18:00:09.000	13915
2018.01.02 18:00:01.000	13914
2018.01.02 18:00:00.000	13914
2018.01.02 17:59:58.000	13915
2018.01.02 17:59:57.000	13918


No idea where the value of 14648 came from. I compared randomly some further Price_A's from the log with the values of Asset_A.t1 and it was always like in the sample: the prices of Zorro's entries and exits are the ones that I also found in .t1. Anything seems sometimes to go wrong with setting PriceA = priceClose().

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #470430
01/14/18 14:30
01/14/18 14:30
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Can you contact Support so that we can look into it? We'll need the script and the historical data of both assets.

Re: Multiple broker connection - beta testers wanted! [Re: jcl] #470432
01/14/18 16:47
01/14/18 16:47
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Done.

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #470547
01/19/18 20:56
01/19/18 20:56
Joined: Dec 2017
Posts: 129
Halifax, NS
K
kujo Offline
Member
kujo  Offline
Member
K

Joined: Dec 2017
Posts: 129
Halifax, NS
Originally Posted By: Sphin
Done.


Hi Sphin, I wonder if you have any updates on your issue?

Re: Multiple broker connection - beta testers wanted! [Re: kujo] #470549
01/19/18 23:15
01/19/18 23:15
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Sorry - of course. The problem was related to the time order of ticks that was fixed in 1.74.6.

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #470550
01/20/18 00:17
01/20/18 00:17
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
In all .t1 data I recorded meanwhile the seconds end with .000. Is it broker / asset dependant or might there be a problem in wdate() why there are no milliseconds?

Re: Multiple broker connection - beta testers wanted! [Re: jcl] #470646
01/27/18 12:19
01/27/18 12:19
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Quote:
The bid price is negative, so:

Code:
void tick()
...



I stored .t1 that way and my .t1 in ZHistoryEditor look like
Code:
2018.01.27 00:28:34.000	177,18
2018.01.27 00:28:34.000	-175,23
2018.01.27 00:28:31.000	177,2
2018.01.27 00:28:31.000	-175,23



Then I modified the code of the BrokerArb example with
Code:
asset("Asset_A");
Spread = marketVal(); // From Manual: For backtesting with variable spread, set Spread = marketVal() in the script.
var SpreadA = Spread, PriceA = priceClose(), CommissionA = ...

asset("Asset_B");
Spread = marketVal();
var SpreadB = Spread, PriceB = priceClose(), CommissionB = ...


But both SpreadA and SpreadB remain always 0.0000. Did I miss something?

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #470663
01/29/18 09:45
01/29/18 09:45
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
For the missing milliseconds, check TickTime - it limits the tick rate and by default depends on the bar period. Maybe it's too high. For the marketVal returning zero, I believe marketVal was so far supported in .t6 files only, and only recently extended to the bid-ask spread in .t1 files. Try the latest beta version.

Page 3 of 6 1 2 3 4 5 6

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1