Is OrderSend() function now able to send ECN trades (with SL and TP) by itself? - page 2

 
JDeel:

In MQL4 I don't know. There is nothing found when seaching the documentation for "market execution", "instant" or "exchange".

I also wonder why there is no single word about this topic in documentation, because there was big attention when OrderSend() started to return error 130 and there was so many questions about this everywhere. But MetaQuotes normally don't listen to what is going on, they prefer to try harder to prove their MQL5 as a better language, which is... not really possible :)

Exactly, and then there is this: https://www.mql5.com/en/forum/143997/page2#773665 which contracidts the documentation.
 

If I use such a value for open price in MT4's Tester, there is error 138 returned (Requote), but in demo mode the trade is opened without problems. Obviously the Tester always thinks that the execution mode is Instant.

So yes, I can tell that the open price does not matter in market mode, which is by definition (it gets the closest available price anyway), and it's not the most correct approach to set stops when in market mode, especially if stops are used as points distance from the open price (not exact price from some indicator). But I don't know how to understand what is the execution mode in MQL4.

And it's not that bad to place stops relative to ask/bid price in market mode, I think it's the same as in Instant execution mode. I'm testing this right now, and most of the times the open price (for Sell) is exactly as the Bid price. When it's not, it's like this:

2013.09.11 13:03:34 MT4 EURUSD,H1: Operation details: Speed 1279 ms | Slippage -0.1 points
2013.09.11 13:03:34 MT4 EURUSD,H1: open #73022670 sell 0.10 EURUSD at 1.32603 sl: 1.32802 tp: 1.32402 ok
2013.09.11 13:03:32 MT4 EURUSD,H1: Bid =1.32602000

or like this

2013.09.11 13:13:41 MT4 EURUSD,H1: Operation details: Speed 296 ms | Slippage 0.6 points
2013.09.11 13:13:41 MT4 EURUSD,H1: open #73022860 sell 0.10 EURUSD at 1.32596 sl: 1.32802 tp: 1.32402 ok
2013.09.11 13:13:41 MT4 EURUSD,H1: Bid =1.32602000 

This comes from:

Print("Bid ="+Bid);
ticket=OrderSend(symbol, type, lots, Bid, slippage, sl, tp, comment, magic, 0, arrowcolor);
      
 

@RaptorUK:

This really is frustrating, you think you know something and then (Bamm) MetaQuotes changes it upon you. I believe that MetaQuotes out_to update the Error_Codes for these changes. News releases are not enough, there needs to be a flag when interacting with in-compatible features.

MetaQuotes rendered the Slippage parameter useless upon ECN Market_Orders but doesn't Flag this error when compiling your codes or during execution. If not for posts like these, I would be sitting there thinking my slippage is working until I get the shock in my pockets.

Sad, as I just don't know what to say until Testing everything Again. I'm definitely going to write the service-desk and complain after I've done testing.

I wouldn't be surprised should one-day mt4 starts behaving like mt5 and the first place you learn this information is within a forum cry-out.

 
ubzen:

@RaptorUK:

This really is frustrating, you think you know something and then (Bamm) MetaQuotes changes it upon you. I believe that MetaQuotes out_to update the Error_Codes for these changes. News releases are not enough, there needs to be a flag when interacting with in-compatible features.

MetaQuotes rendered the Slippage parameter useless upon ECN Market_Orders but doesn't Flag this error when compiling your codes or during execution. If not for posts like these, I would be sitting there thinking my slippage is working until I get the shock in my pockets.

Sad, as I just don't know what to say until Testing everything Again. I'm definitely going to write the service-desk and complain after I'm done testing.

I wouldn't be surprised should one-day mt4 starts behaving like mt5 and the first place you learn this information is within a forum cry-out.

I don't think slippage has ever been useful for Market execution type (which is not the same as Market orders) with MT4/mql4, the slippage parameter has always been useless with ECN brokers. Of course, the documentation should have been updated, for mql4 and mql5. But if these changes with ECN brokers remained unnoticed for 4 months, it's because it doesn't break any existing code.

Before build 500 you have to place an order then modify this one to set sl and tp. This still works, but now you can set sl and tp directly with OrderSend.

 
ubzen:

@RaptorUK:

This really is frustrating, you think you know something and then (Bamm) MetaQuotes changes it upon you. I believe that MetaQuotes out_to update the Error_Codes for these changes. News releases are not enough, there needs to be a flag when interacting with in-compatible features.

MetaQuotes rendered the Slippage parameter useless upon ECN Market_Orders but doesn't Flag this error when compiling your codes or during execution. If not for posts like these, I would be sitting there thinking my slippage is working until I get the shock in my pockets.

Sad, as I just don't know what to say until Testing everything Again. I'm definitely going to write the service-desk and complain after I've done testing.

I wouldn't be surprised should one-day mt4 starts behaving like mt5 and the first place you learn this information is within a forum cry-out.

I agree 100% . . . it's doubly frustrating for those Users, like you, who try and help others, a little change without a documented change to the Documentation will make a liar out of you . . .


I already made a point about Documentation being updated and the updates being stated, Stringo said this would be done . . . https://www.mql5.com/en/forum/13655/page2#comment_585591

 
angevoyageur:

I don't think slippage has ever been useful for Market execution type (which is not the same as Market orders) with MT4/mql4, the slippage parameter has always been useless with ECN brokers. Of course, the documentation should have been updated, for mql4 and mql5. But if these changes with ECN brokers remained unnoticed for 4 months, it's because it doesn't break any existing code.

Before build 500 you have to place an order then modify this one to set sl and tp. This still works, but now you can set sl and tp directly with OrderSend.

I imagine that you're correct about slippage haven't ever being useful. But, how about a flag saying it_isn't_useful. How about some functions to determine the market execution i.e Instant vs Market etc.

Lets take Error# 130 for example.

Stops are too close, or prices are ill-calculated or unnormalized (or in the open price of a pending order). The attempt can be repeated only if the error occurred due to the price obsolescense. After 5-second (or more) delay, it is necessary to refresh data using the RefreshRates function and make a retry. If the error does not disappear, all attempts to trade must be stopped, the program logic must be changed.

Where does the documentations give you a *hint that you're having problems because you cannot send sl/tp with your execution. Instead, people got their answers from people like me on this forum. I intern, received my answer from someone else on the forum. Does MetaQuotes really believe this is the best manner of delivering the message.

Like I Said, this generates more questions for me than it answers. For Example, if by definition, an ECN cannot determine the price until after the OrderSend... how is the stoploss/takeprofit going to play out. [ for Buying ] Is it going to flag for improper stop-loss when it determines that the sl is greater then OrderOpenPrice().

Or am I to expect that orders upon an ECN broker wouldn't slip beyond a pre_defined level vs current Bid|Ask. Don't get me wrong angevoyageur these aren't questions for you. They're questions I'm obviously trying to figure out, hence my Confusion.

On another note, if MetaQuotes keeps updating and assumes that users understands and are playing according to defined market rules. Then it's just a matter of time until MQ makes mt4 Long_Order exit with a Short_Order. Someone might say, well I imagine that's how it's always been. And they might be correct, but the way it happens behind the scenes and the user interaction is important and very different. MetaQuotes is failing to interact with user/developers correctly. IMO.

Added: I removed my later posts because they were off-topic.

 
ubzen:


Added: I removed my later posts because they were off-topic.

Perhaps they were, but they weren't totally disconnected wit this topic and it was a discussion that needs to be had.
 

Guys, to sum up, is it now possible to set stop loss and take profit during OrderSend() when working with ECN brokers?

Thanks.

 
fudge: Guys, to sum up, is it now possible to set stop loss and take profit during OrderSend() when working with ECN brokers? Thanks.
Yes.
 
ubzen:
Yes.


Does it depend on the broker or only the MT4 version, i.e. on build 509 it will work for all ECN brokers?
Reason: