Gamestudio Links
Zorro Links
Newest Posts
Why Zorro supports up to 72 cores?
by 11honza11. 04/26/24 08:55
M1 Oversampling
by 11honza11. 04/26/24 08:32
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, VoroneTZ, Quad, 1 invisible), 837 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 6 1 2 3 4 5 6
Multiple broker connection - beta testers wanted! #468286
09/28/17 06:55
09/28/17 06:55
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
We're currently looking for beta testers for the Zorro S feature "Simultaneous connection to multiple brokers". If you have Zorro S and are interested in broker arbitrage or whatever you can do with this feature, please contact support(at)opgroup.de.

Re: Multiple broker connection - beta testers wanted! [Re: jcl] #468561
10/10/17 09:10
10/10/17 09:10
Joined: Jun 2016
Posts: 30
france
S
stephane97490 Offline
Newbie
stephane97490  Offline
Newbie
S

Joined: Jun 2016
Posts: 30
france
Hi, for example, I can download at the same time data from alpha vantage and uses them for live trading with fxcm ?

Re: Multiple broker connection - beta testers wanted! [Re: stephane97490] #468563
10/10/17 10:33
10/10/17 10:33
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
That would work with any Zorro version. AlphaVantage is no broker connection.

Re: Multiple broker connection - beta testers wanted! [Re: jcl] #469956
12/16/17 12:43
12/16/17 12:43
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Just making some experiments with it. If the MT broker does not offer tick data (or not really sufficient) accessible with assetHistory I think it must be possible to record it in live trading with the tick function and the example in the manual "print every price quote in a file". I'm searching for a possibility to convert this file to .t1 but unfortunately the CSVToHistory script covers only .t6 data. It would be very helpful to know how the format string for dataParse has to look like for .t1 or a hint to the manual if I missed something. laugh

Thanks Sphin

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

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
You need no .t1 format string. Just store the t1 data directly.

Code:
void tick()
{
	T1* Ask = dataAppendRow(1,2);
	Ask->time = wdate();
	Ask->fVal = priceClose();
}

void click()
{
	dataSort(1);
	dataSave(1,strf("History\\%srec.t1",strx(Asset,"/","")));
	quit("Done!");
}

void run()
{
	BarPeriod = 1;
	LookBack = 0;
	panelSet(-1,-1,"Save");
}


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

Joined: Dec 2013
Posts: 568
Fuerth, DE
Thanks a lot!

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #470167
12/30/17 18:08
12/30/17 18:08
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
This works! After I stored some days of .t1 data, made my first tries in backtesting the 'Simple broker arbitrage example' to find out a suitable threshold and then tried a live demo - nothing happened. While printing the spreads to csv I found out that they behave quite differently from simulation with fixed spreads so it might be better to simulate with the variable spreads stored from live/demo environment. From the manual:

Quote:
Both .t1 and .t6 data can contain the current ask-bid spread, which is returned by the marketVal function. For backtesting with variable spread, set Spread = marketVal() in the script.

But how to store the spread in .t1 so that is accessible with marketVal()?

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

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
The bid price is negative, so:

Code:
void tick()
{
	T1* Ask = dataAppendRow(1,2);
	Ask->time = wdate();
	Ask->fVal = priceClose();
	T1* Bid = dataAppendRow(1,2);
	Bid->time = wdate();
	Bid->fVal = -(priceClose()-Spread);
}


Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #470225
01/03/18 16:11
01/03/18 16:11
Joined: Dec 2016
Posts: 71
F
firecrest Offline
Junior Member
firecrest  Offline
Junior Member
F

Joined: Dec 2016
Posts: 71
Hi Sphine,

I have tried broker arbitrage using the same asset between Oanda and IG but was not successful. I used Demo account to play this. I think one possible factor is connection speed. Can it be this strategy is untouchable for retail traders?

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
What do you mean with "not successful" - technically or financially? Didn't the script trade at all or weren't the trades profitable?
I use the 'Simple broker arbitrage example' actually only to record spread and price (there is no commission at the used brokers) to find out a practical threshold and to view the relations between these components in a real environment.

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #470231
01/03/18 23:04
01/03/18 23:04
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline
Senior Member
Grat  Offline
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
Hi,

Is no possible this:

BrokerA: zorroMT4
BrokerB:zorroMT64

...............

Login MT4/5...
!FXOpen Investments Inc. connected
!MT4/5 time zone shift -2 at UTC 01-03 23:01
Error: Can't open ZorroMT64.dll!
---------------
Zorro S 1.74

Milan

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #470232
01/04/18 02:01
01/04/18 02:01
Joined: Dec 2016
Posts: 71
F
firecrest Offline
Junior Member
firecrest  Offline
Junior Member
F

Joined: Dec 2016
Posts: 71
Originally Posted By: Sphin
What do you mean with "not successful" - technically or financially? Didn't the script trade at all or weren't the trades profitable?
I use the 'Simple broker arbitrage example' actually only to record spread and price (there is no commission at the used brokers) to find out a practical threshold and to view the relations between these components in a real environment.


I mean financially. Technically Zorro works great. "not successful" means that the Demo accounts in both brokers are making a loss instead of gain. I use higher threshold and no trades are triggered. If I use lower threshold, trades are not profitable and losses are limited. The differences between prices of the same asset are too small (about 2- 3 pips) for profit. It can work if only one has almost zero commission and connection speed to capture this.

I think another way to work around this is to trade Indices instead of FX. I have not tried out indices yet but I think it maybe possible. I am sharing what I know to the community and hope this help.

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

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
ZorroMT64 is no broker plugin, it belongs to the MT5 library folder only.
For connecting to a MT5 broker, use the normal ZorroMT4 plugin, and rename it as described for connecting to 2 different MT4/5 brokers.

Re: Multiple broker connection - beta testers wanted! [Re: jcl] #470241
01/04/18 14:53
01/04/18 14:53
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline
Senior Member
Grat  Offline
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
Thank's

now working a correct. I was thinking ZorroMT4 -> MT4 and ZorroMT64 -> MT5. This is a my fault.


Milan

Re: Multiple broker connection - beta testers wanted! [Re: Grat] #470289
01/07/18 12:53
01/07/18 12:53
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
There are some things I cannot comprehend. For searching reasons of lost trades I added this line to the simple broker arbitrage example before any enterX() or exitX() command:
Code:
print(TO_LOG, "\nPriceA: %.0f, PriceB: %.0f, Difference: %.0f", PriceA, PriceB, Difference);


Setting slippage = 0 I expected the logged prices to be the same as the traded ones but:
Code:
[4: Tue 18-01-02 04:00:00] 66.73 0 1/3  (13605.60)

PriceA: 13069, PriceB: 13412, Difference: -343
[Asset_A::L0501] Long 100@13069.00000  at 04:00:00
[Asset_B::S0502] Short 1@13204.59961  at 04:00:00

[5: Tue 18-01-02 05:00:00] 66.73 -155 1/5  (13412.70)
[6: Tue 18-01-02 06:00:00] 66.73 -131 1/5  (13197.10)

PriceA: 13294, PriceB: 13231, Difference: 62
[Asset_A::L0501] Sell 100@13294.00: +162 at 06:00:00
[Asset_B::S0502] Cover 1@13431.50: -283 at 06:00:00


While the logged PriceAs are the same at long entry and sell exit, the differences of logged PriceBs to its short entry is 208 and to its cover exit -200.
The deviation is so extreme that the exit condition is simply not met because PriceA (13294) minus 'traded' PriceB (13431) is -137 and therefore still lower than 0. So the negative result is no surprise.
Any hint where those deviations can result from?

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #470296
01/07/18 16:13
01/07/18 16:13
Joined: Dec 2016
Posts: 71
F
firecrest Offline
Junior Member
firecrest  Offline
Junior Member
F

Joined: Dec 2016
Posts: 71
Hi, can it be due to be bid and ask price?

Re: Multiple broker connection - beta testers wanted! [Re: firecrest] #470297
01/07/18 16:22
01/07/18 16:22
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
I supsected it but setting Spread = 1 (and threshold accordingly otherwise it was sensless) the differences kept their sizes like above, so I excluded this idea.

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #470308
01/08/18 08:15
01/08/18 08:15
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
The prices in the log are ask prices anyway. Have you set slippage to 0? Why is the number of lots different?

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
Of course slippage is set to 0 already (PriceA is therefore the entry at Broker A, this works as expected). The different lot numbers egalize that Broker A has a minimum trade size of 0.01, Broker B 1.0.

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #470333
01/08/18 17:44
01/08/18 17:44
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Ok, then I also don't know the reason of the difference. We'll check that. - Update: it turned out that it was a bug of the beta version. This will be fixed in the release.

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,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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.

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
TickTime should be 100ms by default (BarPeriod = 1), can it be set to 0 or 1?

Yes, 1.78.5 can read the bid-ask spread from .t1 with marketVal(), great!

Is it possible to observe and trade more than one asset at 2 Brokers with one script (renaming variables SpreadA/B, CommissionA/B, Difference and Threshold to asset-individual ones and list the further asset(s) in the run function) or are there limitations e.g. in the tick function or is it recommended to use seperate scripts?

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #470804
02/07/18 11:18
02/07/18 11:18
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Yes, for downloading data you can set TickTime to a small value. I don't know what happens when you set it to 0, but 1 should work.

The brokerarb script should also work with several assets.

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
TickTime = 1 does not change resolution, there are no values below 1 second but .000. I used FXCM for this test and I think they provide milliseconds in general, at least in the .t1 from the download page.

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #470923
02/13/18 09:36
02/13/18 09:36
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Ok, we'll look into that. - Update: it appears to be not related to TickTime at all, but a bug with the wdate function. This will be fixed in the next version.

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
I have a strange problem with (normal) currencies (with crypto assets all works fine), I always get the same result of -600 of each phantom trade:

{GBPUSD_B1::l6801} Long 1@1.40057 at 20:08:34
{GBPUSD_B2::s6802} Short 1@1.40113 at 20:08:34
{GBPUSD_B1::l6801} Sell 1@1.40070: -600 at 20:08:40
{GBPUSD_B2::s6802} Cover 1@1.40065: -600 at 20:08:40

[1268: Mon 18-02-05 20:09:02] (1.40118)
{GBPUSD_B1::s6901} Short 1@1.40179 at 20:09:10
{GBPUSD_B2::l6902} Long 1@1.40119 at 20:09:10
{GBPUSD_B1::s6901} Cover 1@1.40176: -600 at 20:09:17
{GBPUSD_B2::l6902} Sell 1@1.40187: -600 at 20:09:17

[1269: Mon 18-02-05 20:10:03] (1.40141)
{GBPUSD_B1::s7001} Short 1@1.40187 at 20:10:12
{GBPUSD_B2::l7002} Long 1@1.40131 at 20:10:12
{GBPUSD_B1::s7001} Cover 1@1.40181: -600 at 20:10:14
{GBPUSD_B2::l7002} Sell 1@1.40222: -599 at 20:10:14

In the asset list GBPUSD_X looks identical to the other assets:

GBPUSD_B1,1.41249,0.00047,-0.4898,0.3292,0.00010,0.080288,2.8336,400.218,1000.0,0.600,B1_Arb:GBP/USD
GBPUSD_B2,1.54901,0.00006,0.07,-0.15,0.0001,0.09129,16,0,1000,0.6,B2_Arb:GBP/USD

Any idea where I can search for the reason?

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #471071
02/18/18 16:53
02/18/18 16:53
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
I think, the parameters in the asset list are different when the asset is a currency or not. GBPUSD_B1 is probably not detected as currency because of the "_B1".

Re: Multiple broker connection - beta testers wanted! [Re: Petra] #471073
02/18/18 18:05
02/18/18 18:05
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
As far as I know the only part in the asset list that distinguishes currencies from other assets is the 'LotAmount' which is 1000 (in my case on micro accounts) with currencies. But I don't know if trade results of currencies are calculated separately?
Within the 6 trades above the results vary from -1,3 to +9,1 PIPs with 1 Lot each and the monetary result is always -600. I think e.g.

{GBPUSD_B1::l6801} Long 1@1.40057 at 20:08:34
{GBPUSD_B1::l6801} Sell 1@1.40070: -600 at 20:08:40

the calculated difference in 1 Lot is 1,400.70 - 1,400.57 = 0.13 and might be anyway around -0.50 (with commission and intermediate spread) but I cannot comprehend where the -600 come from. This way there are only a few of those trades needed to blow up my account.

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #471088
02/19/18 11:05
02/19/18 11:05
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Trading costs are 10,000 times higher due to the Forex multiplicator. Check out the latest beta version. Asset names like "GBPUSD_B1" should be of type Forex in that version. In previous versions they were not.

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
Can confirm both, EURUSD_B1 is identified as Forex and the issues in the Forex trades from above has been gone in 1.79.3.

Okay, the resolutions of trade results are now up to 7 decimals although I did not modify the assets in the asset list to more decimals
Quote:
{EURJPY_B1::s5701} Cover 1@132.32: -0.0070341 at 05:14:11
but I don't mind about it. laugh

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #471166
02/21/18 09:19
02/21/18 09:19
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
If you do not explicitely set a number of decimals, the decimals depend on the amount.

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,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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

Re: Multiple broker connection - beta testers wanted! [Re: kujo] #471418
03/03/18 05:34
03/03/18 05:34
Joined: Sep 2017
Posts: 235
H
Hredot Offline
Member
Hredot  Offline
Member
H

Joined: Sep 2017
Posts: 235
Wait, you guys realize that this difference is literally hundredths of a cent? How many trades per second do you plan to perform for this to possibly have any effect?

Re: Multiple broker connection - beta testers wanted! [Re: Hredot] #471420
03/03/18 09:43
03/03/18 09:43
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
If the trading idea is broker arbitrage where trading decisions are mainly based on price differences in the amount of SpreadA+SpreadB+CommissionA+CommissionB then spreads matter. They maybe small in one unit of a currency that you mostly trade at least with factor 1,000 but e.g. in BTCUSD the spread is not seldom around 50 USD.

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #471422
03/03/18 10:51
03/03/18 10:51
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Does the FXCM API support OrderLimit? If not is there any broker known that does?

As far as I think to know something like this should not happen:
Code:
[1158: Fri 18-03-02 14:17:01] (1.37795)
2018-03-02 14:17:55.4555
Asset: GBPUSD_FXCM, Price: 1.37750, Spread: 0.00001, Commission: 0.00007, TickAge: 0.00002
OrderLimit: 1.37746
[GBPUSD_FXCM::S5254] Short 1@1.37694  at 14:17:55.



How to avoid it if OrderLimit is not supported? Setting any Entry away from the actual price only to open a pending trade and using a 'PriceLimit' in a TMF?

Code:
int TMF(var PriceLimit) {
 if(!TradeIsOpen) {
  if(TradeIsLong && TradePriceOpen > PriceLimit) 
        return 1;
  if(TradeIsShort && TradePriceOpen < PriceLimit) 
	return 1;
 }
}



Is this a viable way to simulate OrderLimit?

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #471440
03/04/18 13:16
03/04/18 13:16
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
For better comprehensibility and because they don't deal with broker arbitrage directly I divided my questions in different threads. Thanks so far.

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #471476
03/05/18 19:32
03/05/18 19:32
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Sorry for quite many forum entries but I have another issue.

Quote:
Stop, Profit, Trail, Entry, ...
[...]All parameters above must be set after selecting the asset and before calling enterLong / enterShort. They have no effect on different assets [...]

Can it be that e.g. EURUSD_B1 and EURUSD_B2 are considered as one asset anyway? I have to reset Entry explicitly after changing asset from XXX_B1 to XXX_B2 or is this intended?

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #472457
04/28/18 22:32
04/28/18 22:32
Joined: Feb 2018
Posts: 236
Italy
tradingest Offline
Member
tradingest  Offline
Member

Joined: Feb 2018
Posts: 236
Italy
I'm available for beta testing

Re: Multiple broker connection - beta testers wanted! [Re: tradingest] #472530
05/03/18 09:03
05/03/18 09:03
Joined: Jan 2016
Posts: 122
V
Veratyr Offline
Member
Veratyr  Offline
Member
V

Joined: Jan 2016
Posts: 122
I've been testing the beta with 3 assets across 4 brokers and I've found that Zorro can't keep up with the data.

I have the Zorro window and the MT4 status windows right next to each other and watch the price on Zorro's status bar. I notice that somewhat frequently, Zorro holds still for at least a second at a time, while I can still see MT4 ticking. Zorro even keeps its little asterisk while I see the price change.

I've talked to support and they've just told me to increase TickTime (which is currently 1) but I don't think this is a good option, as broker arbitrage is extremely latency sensitive.

Re: Multiple broker connection - beta testers wanted! [Re: Veratyr] #472818
05/25/18 02:24
05/25/18 02:24
Joined: Dec 2016
Posts: 71
F
firecrest Offline
Junior Member
firecrest  Offline
Junior Member
F

Joined: Dec 2016
Posts: 71
Originally Posted By: Veratyr
I've been testing the beta with 3 assets across 4 brokers and I've found that Zorro can't keep up with the data.

I have the Zorro window and the MT4 status windows right next to each other and watch the price on Zorro's status bar. I notice that somewhat frequently, Zorro holds still for at least a second at a time, while I can still see MT4 ticking. Zorro even keeps its little asterisk while I see the price change.

I've talked to support and they've just told me to increase TickTime (which is currently 1) but I don't think this is a good option, as broker arbitrage is extremely latency sensitive.


I guess this means that broker arbitrage is out of retail traders reach.

Re: Multiple broker connection - beta testers wanted! [Re: firecrest] #472836
05/25/18 17:32
05/25/18 17:32
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
This might be true or not but I can't see the relationship between your conclusion and the quote of Veratyr's post. Zorro will be developed continuously and if there are such problems I think they will be amended shortly.

Re: Multiple broker connection - beta testers wanted! [Re: Sphin] #473338
06/29/18 16:35
06/29/18 16:35
Joined: Dec 2016
Posts: 71
F
firecrest Offline
Junior Member
firecrest  Offline
Junior Member
F

Joined: Dec 2016
Posts: 71
Zorro is OK. I think is my my connection or hardware which are not fast enough to play this strategy.

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