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
2 registered members (Imhotep, opm), 785 guests, and 4 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 5 of 6 1 2 3 4 5 6
Re: Multiple broker connection - beta testers wanted! [Re: jcl] #471250
02/25/18 12:03
02/25/18 12:03
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
I have 2 further issues (1.79.3):

1. The calculated spreads from the marketVal() function seem not to be correct or not always. This effects of course only test mode, in trade mode with the spreads coming from the brokers all is ok.

Quote:
From Log:
2018-02-23 08:42:49.604
AssetA: EURGBP_B1, PriceA: 0.88072, SpreadA: 0.00000, CommissionA: 0.00007

From .t1 with ZHistoryEditor:
2018.02.23 08:42:49.604 0,88072
2018.02.23 08:42:49.604 -0,88064


From Log:
2018-02-23 14:59:42.400
AssetA: EURGBP_B1, PriceA: 0.87982, SpreadA: 0.00004, CommissionA: 0.00007

From .t1 with ZHistoryEditor:
2018.02.23 14:59:42.399 0,87982
2018.02.23 14:59:42.399 -0,87974

From Log:
2018-02-23 15:05:34.602
AssetA: EURGBP_B1, PriceA: 0.88017, SpreadA: 0.00000, CommissionA: 0.00007

From .t1 with ZHistoryEditor:
2018.02.23 15:05:34.602 0,88017
2018.02.23 15:05:34.602 -0,88008


From Log:
2018-02-23 15:00:5.196
AssetA: EURGBP_B1, PriceA: 0.88020, SpreadA: 0.00008, CommissionA: 0.00007

From .t1 with ZHistoryEditor:
2018.02.23 15:00:05.195 -0,8801
2018.02.23 15:00:05.195 0,8802

From Log:
2018-02-23 15:49:25.268
AssetA: EURGBP_B1, PriceA: 0.87907, SpreadA: 0.00003, CommissionA: 0.00007

From .t1 with ZHistoryEditor:
2018.02.23 15:49:25.268 0,87907
2018.02.23 15:49:25.268 -0,87899


I coded one strategy on 2 ways (one with fixed asset calls, the other one with a loop) and received 2 different results while testing. Searching for an error I surprisingly found out that both variants did exactly the same trades, only their results differ.

Quote:
from the 1st:

[54: Fri 18-02-23 00:54:00] (0.88342)
[EURGBP_B1::S5501] Short 1@0.88331 at 00:55:00
[EURGBP_B2::L5502] Long 1@0.88317 at 00:55:00

[55: Fri 18-02-23 00:55:00] 0000 -0.88 0/2 (0.88296)
[EURGBP_B1::S5501] Cover 1@0.88335: -0.77 at 00:55:31
[EURGBP_B2::L5502] Sell 1@0.88332: +0.0563 at 00:55:31


[491: Fri 18-02-23 08:11:00] -0.72 0 1/1 (0.88162)
[EURGBP_B1::L9201] Long 1@0.88137 at 08:11:31
[EURGBP_B2::S9202] Short 1@0.88175 at 08:11:31

[EURGBP_B1::L9201] Sell 1@0.88154: -0.53 at 08:11:51
[EURGBP_B2::S9202] Cover 1@0.88151: +0.19 at 08:11:51

from the 2nd:

[54: Fri 18-02-23 00:54:00]
[EURGBP_B2::L5501] Long 1@0.88317 at 00:55:00
[EURGBP_B1::S5502] Short 1@0.88331 at 00:55:00

[55: Fri 18-02-23 00:55:00] 0000 -0.27 0/2
[EURGBP_B1::S5502] Cover 1@0.88335: -0.24 at 00:55:31
[EURGBP_B2::L5501] Sell 1@0.88332: +0.0563 at 00:55:31


[491: Fri 18-02-23 08:11:00] -0.18 0 1/1
[EURGBP_B1::L9201] Long 1@0.88137 at 08:11:31
[EURGBP_B2::S9202] Short 1@0.88175 at 08:11:31

[EURGBP_B2::S9202] Cover 1@0.88151: +0.22 at 08:11:51
[EURGBP_B1::L9201] Sell 1@0.88154: +0.11 at 08:11:51


How can I find out what is right or better: reliable?

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

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
There must be a reason of the different results, but that is hard to tell without seeing the code. Can you contact Support with both variants? The'll look into it.

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
Thanks, because of the 2nd issue I investigate further and have to stripe down the codes before sending them to support.
But can you please check concerning the 1st one? I set SpreadA = marketVal() in test mode but the values does not match the ask / bid differences in the related .t1 files. This happens only in test mode, if the values come from the broker in trade mode Spread works fine. Thanks.

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #471352
02/28/18 18:14
02/28/18 18:14
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 spread, check the difference of bid and following ask in the history. I believe the used order is bid->ask, not ask->bid.

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
Ohh...kay, I take 2 subsequent price ticks from the .t1

t(0):
2018.02.23 21:59:14.915 1,22987
2018.02.23 21:59:14.915 -1,22933

t(1):
2018.02.23 21:59:13.445 1,22983
2018.02.23 21:59:13.445 -1,22929

The spread at t(0) then is ask(t(0)) - bid(t(1))?

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #471392
03/02/18 17:25
03/02/18 17:25
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 time t plays no role. Only the order matters. The spread is ask - latest bid.

Re: Multiple broker connection - beta testers wanted! [Re: jcl] #471398
03/02/18 17:57
03/02/18 17:57
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Sorry but I don't understand the word 'order' in this context if time plays no role. My simple problem is that I can't comprehend the spreads in the log of a back test. So I only want to know how to calculate the spread if time is 2018.02.23 21:59:14.915 and the .t1 file of the asset shows the entries above because my thinking of the spread as the difference of both absolut values at 2018.02.23 21:59:14.915 seems to be wrong.

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #471408
03/02/18 21:03
03/02/18 21:03
Joined: Dec 2017
Posts: 129
Halifax, NS
K
kujo Offline
Member
kujo  Offline
Member
K

Joined: Dec 2017
Posts: 129
Halifax, NS
As I understand it, it should be 1.22987-1.22933 = 0.00054.
What does Zorro give you?

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
This was also my first guess but see my post on top of the page:

if the prices in .t1 are e.g.

2018.02.23 08:42:49.604 0,88072
2018.02.23 08:42:49.604 -0,88064

Zorro says spread = 0.00000.

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

Joined: Dec 2017
Posts: 129
Halifax, NS
Did you send it to support? Look like a bug. It should be pretty straitforward

Page 5 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