Strange behavior of limit orders on a large swiss ECN broker

 

hi,

i am currently thinking of switching broker, i know that broker discussons are not allowed on this forum, but this is a specific issue with mql language.

the broker i am talking about offers its own trading software with the support of EA, but before i switch i would like to demo test my strategys on this broker because i have no idea how variable spread and commision influences my strategys.

fortunatly the broker also offers a mt4 platform (still beta, but "working").

as i am not a fan of requotes and such errors all my EA's work with limit/stop orders. in my view the only way to trade.

and here is my problem. i know from the other platform that the broker let me put Offers inside the market, with this feature you have the possibility to buy under the ask line and sell above the bid. shure this sounds to good to be true, but sometimes with this technique its possible to make some extra pip.

so far so good. but it seems that the limit orders my EA's sets are not truely limitorders but market offers instead. so why this is a problem?

because it's possible that only a part of your "market offer" (limit in mql) is filled and the other part is still a limit order.

so the position gets splitted and get's a new ticket. and here is the problem, my EA's (checking the ticket) don't know that a order was opened and so they don't get closed-

example:

EA places a sell limit with 2lots at 1.2222 ticket nr: 12

prices are moving around 1.2220

somehow a part of my limit gets executed but prices never reached 1.2222

in my terminal i have following orders:

sell limit 1.9lot @ 1.2222 ticket nr:12

sell 0.1lot @ 1.2222 ticket nr:13

has somebody here similar issues and maybe a solution so that i can test my strategys before converting them into a new language?

thanks in advance.

//z

 

Since this sounds like a rather specific protocol implemented by your broker have you made any inquiries to your broker as to how they envision their customers dealing with their split-ticket protocol? I'd be surprised if they don't get this question often from their clients, and as such they likely have the answers for you.

 
have a sequence number to differentiate each order using the "comment" parameter of the OrderSend() function, also pass the lot size. then cycle through the orders list: if OrderLots() does not match the total lots retrieved from the "comment" parameter then it is a split order and cycle through the orders list untill all the lots have been retrieved. If your broker does not replicate your comment to all parts of your order then try using an external global variable.
 

EA places a sell limit with 2lots at 1.2222 ticket nr: 12

prices are moving around 1.2220

somehow a part of my limit gets executed but prices never reached 1.2222

On a sell it is the Ask that gets filled. If the spread was 2 pips your sell will get filled when the Bid reached 1.2220. MT4 are Bid charts.
 

hi, mt4 in that broker has a separate ask chart. so that's not the problem. also the order in immediately in profit.

also filling the order is not a problem for me, i placed the order so i would like it to be filled, but only partial fill and spliting the order is a problem for my EA i will give it a try to implement sxTed's solution. seems a workaround but if its work i can life with that

 
so far so good. but it seems that the limit orders my EA's sets are not truely limitorders but market offers instead.

A Buy limit is buy this price or better, so if the market is below the limit it will immediately become a market order since below is a better price.

A Buy stop becomes a market order when the market rises up to the price.

Are you mixing the two?

 
I can see that you are trouble with your broker. Choosing a broker is a tough job and need to research its legitimacy here, and in doing so one must get educated to understand Forex more and its complexities. There are lots of good resources out there to help. One of the best I have come across is makemoneycurrencytrading dot co dot uk > as they run free webinars and training. And they run live portfolio so you can actually see if their strategies are making profit live. They also send out a daily report each day with the trades.
 
berny:
One of the best I have come across is xxxxxxxxxxxxxxxxx


Hey berney, be careful to keep posts on topic

We are not comparing brokers here, this is a technical issue that might arise with any broker

Also contain your enthusiam for that particular site you mention, it isnt providing MQL code...

-BB-

 
BarrowBoy:

[...] this is a technical issue that might arise with any broker [...]

Strictly speaking, I don't think this is the case. It looks as though part of the issue is that D*******y allow partial fills, which would make them unique in my experience among MT4 brokers. One of the things which makes programming in MT4 so simple compared to other platforms is the absence of partial fills.
 

jjc

part of the issue is that D*******y allow partial fills

That's what I thought but I was trying to... generalise the topic to keep it in bounds!

-BB-

 

Yeah, I have run some demo's with this large swiss ECN.....they tend to change the OrderComment and the MagicNumbers which is a real pain. My other broker which is a large US Broker also allows partial fills and they do it without having to change these aspects of an order.

I think D*********y is going to have to sort out the matter from their side or else they are useless to me(and any other EA trader I would imagine).

Reason: