Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Quad, VoroneTZ, PeroPero), 841 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 7 1 2 3 4 5 6 7
Brokers incompatible with MT4 bridge? #458503
03/16/16 05:14
03/16/16 05:14
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline OP
Senior Member
boatman  Offline OP
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
Is it possible for the MT4 platforms of individual brokers to be incompatible with the Zorro MT4 bridge?

I am asking because I have found that when connected to a certain broker in live trading mode, Zorro detects obviously erroneous ticks. I can find no trace of these erroneous ticks in the MT4 chart, nor in the MT4 history centre. No trades have so far been executed at or close to these levels, which makes me question whether these ticks actually existed. Is it possible that the Zorro bridge could somehow register a tick that never existed?

Although no trades have been executed at these erroneous tick levels, my system uses the recent high and recent low by way of the HH() and LL() functions. These erroneous ticks have a significant impact on the values calculated by these functions (verified by printing indicator values to the log file) and several trades have been executed as a result, when they clearly shouldn't have.

This issue first came to my attention last night on EUR/USD. Attached is the image that Zorro created - although the quality is not great (I am running my VPS using 15-bit color to free up as much RAM as possible) you can see the erroneous ticks occurring between 7 and 8 PM at values of approximately 2.3 and 1.7. These ticks dwarf the scale and therefore the rest of the price curve is barely visible. Clearly EUR/USD never traded at these levels and there is no sign of these ticks in the broker's MT4 feed.



I have started running the same system with another broker and have yet to observe this behavior.

The broker that I am having trouble with is Katalon Markets. Here is the link to download their MT4 platform: https://download.mql5.com/cdn/web/7580/mt4/katalonmarket4setup.exe

I would very much appreciate any insight into what could cause this and what the possible workarounds could be. I do understand that it is possible that the broker widened the spread and created these ticks artificially, and while I won't rule that out, I consider it highly unlikely. The GM of this firm is personally known to me and I would be extremely surprised if this turned out to be the case. So for the purposes of this exercise, could we please just focus on what, if anything, related to the Zorro MT4 bridge could cause this.

Thanks in advance

Re: Brokers incompatible with MT4 bridge? [Re: boatman] #458505
03/16/16 09:31
03/16/16 09:31
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
This does not look like a incompatibility, it looks like an outlier. It can be prevented by software, and there is indeed an outlier filter build in Zorro, it's just not activated since we did not have such a case so far. Does it happen often with this broker, or was it only this one time?

Re: Brokers incompatible with MT4 bridge? [Re: jcl] #458509
03/16/16 10:49
03/16/16 10:49
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline OP
Senior Member
boatman  Offline OP
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
It has happened several times today with this broker. In addition, I tested the same script on a second broker (Royal Financial) and the same thing happened. It didn't happen often - just once and I ran the live script for approximately 4 hours during the day today. It happened both on my VPS and on my desktop PC, if that makes any difference.

Re: Brokers incompatible with MT4 bridge? [Re: boatman] #458512
03/16/16 12:06
03/16/16 12:06
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Ok, we'll look into that. Inbetween you can set

TickSmooth = 100;

This will suppress outliers.

Re: Brokers incompatible with MT4 bridge? [Re: jcl] #458513
03/16/16 12:30
03/16/16 12:30
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi jcl, boatman,

This brings up some interesting questions...

From what I read of TickSmooth, a value of 100 would "suppress" by ~99%? Does TickSmooth drop the tick or cause the tick's actual value to be replaced by the EMA value? Besides changing the tick stream, the EMA-introduced delay could of course be problematic also depending on the strategy...

Assuming that Zorro isn't creating these ticks, they're coming from the broker - either directly if DD or as a pass-through from the liquidity provider if NDD? In either case, why then wouldn't they be in the broker's MT4 history? Do brokers regularly "scrub" their history? Is there something in the Terms of Service that say these outliers are the client's problem?

boatman, have you asked the brokers about this & what's going on? Since it's happened at more than 1 broker, is it some sort of "industry standard" that all are using?

Thanks.

Re: Brokers incompatible with MT4 bridge? [Re: DdlV] #458518
03/16/16 20:22
03/16/16 20:22
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline OP
Senior Member
boatman  Offline OP
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
Hi DdlV

I haven't yet approached the broker about this. Before I do that, I would like to have some more evidence that these ticks are actually coming from the broker. While I am keeping an open mind about the source of the problem, I think that it is more likely to be a bug either with the script (unlikely, since no such ticks are evident in the backtest), my own set up (although I have reproduced the issue on two different machines with different installations of Zorro - both V1.42) or with the communication between MT4 and Zorro.

Thanks for the workaround jcl, I'll give that a try.

Re: Brokers incompatible with MT4 bridge? [Re: boatman] #458519
03/16/16 20:25
03/16/16 20:25
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline OP
Senior Member
boatman  Offline OP
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
Update: this is the result of running the same script (sans trade entries) last night on two different brokers from my desktop PC. I also reinstalled both Zorro 1.42 and MT4 bridge 1.8 prior to starting this test run.





The 'bad ticks' seem to come at random. I'm scratching my head over this one - got me stumped.

Last edited by boatman; 03/16/16 20:32.
Re: Brokers incompatible with MT4 bridge? [Re: boatman] #458524
03/17/16 09:28
03/17/16 09:28
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
If someone wants to test if his broker has a similar problem, here's an outlier test script:

Code:
#define LastPrice AssetVar[0]

void tick()
{
	var Price = priceClose();
	if(LastPrice > 0 && 
		(Price < 0.75*LastPrice || Price > 1.25*LastPrice))
		printf("\nOutlier!! %s Last: %.4f Now: %.4f",Asset,LastPrice,Price);
	LastPrice = Price;
}

void run()
{
	set(LOGFILE);
	if(!is(LOOKBACK)) printf("\n");
	while(asset(loop("EUR/USD", "USD/JPY", "USD/CAD", "EUR/JPY", "EUR/AUD", "EUR/GBP", "AUD/JPY", "AUD/USD"))) 
	{
		if(!is(LOOKBACK)) printf("%s: %.4f, ",Asset,priceClose());
	}
}



We had no outliers so far with the brokers we've tested. But we're looking into Katalon now.

Re: Brokers incompatible with MT4 bridge? [Re: jcl] #458525
03/17/16 11:44
03/17/16 11:44
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline OP
Senior Member
boatman  Offline OP
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
Thanks. I've not yet received any strange outlying ticks from trading your test script.

Could this issue be related to my script? I sent the script to support - could you possibly look over it, or at least suggest what could cause the issue that I am having so that I can solve it myself?

Thanks

Re: Brokers incompatible with MT4 bridge? [Re: boatman] #458527
03/17/16 13:12
03/17/16 13:12
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes, we got that script and will check it. The problem is not outliers, but probably something else in the script overwriting prices or otherwise producing the lines in the chart. The prices are stored in arrays in the ASSET struct - you can see that in the trading.h header.

This can be hard for you to solve, since it's possibly not a bug in your script, but a bug in a used indicator. What you could do in such a situation is removing indicators and other elements step by step until the problem disappears. But wait for the support, they have better tools to look into those problems.

Page 1 of 7 1 2 3 4 5 6 7

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