The fastest way to open a position? - page 2

 

1. By definition of MT it is not, agreed, but what price will you get when price gaps against you? I'll bet you not the one you entered. For trader it is, and always was (at least for the 20 years I am in this business), slippage on a trade. For you, as a programmer, it is not, since it doesn't fit into "slippage" definition of MQL.

2. There is never slippage on TP (on MT4) ! And you can say that again. Even if it gaps through your TP you will get the price you entered. Broker doesn't give you extra money in profit, believe me. (This is not the NewYork Stock Exchange where you get the last price the shares traded at, since there is a tape of trades, second by second, trade by trade, and the market is centralized. You can always "go to the tape", as traders say, and prove your price). Here things are different. (No criticizm - just facts).

3. TP is a LIMIT not a stop order. Just because it closes your position it does not make it a stop order. I am talking in terms of investments and trading, not in terms of your program. If you don't believe me, think in terms of MT5, what order will you put to net-off your long position? Limit order to sell, correct. And now you tell me what pending order closes out your short position? If at a loss it will be a STOP order to buy, but at a profit? Limit order! That is your TP! This is the easiest way to explain it.

4. When programmers go into trading they think in terms of their program and the definitions they create for themselves. You can argue with me on programming, and will probably be right 8 times out of 10, but leave trading to traders :).

 
WHRoeder:
  1. Are you sure it 4 pips and not 4 points? Are you using a 4 digit broker or 5? There are cheaper brokers.
  2. A pending order is sitting on the brokers server. How can there be slippage? Slippage is a change in the brokers price after it is sent over the network to the terminal and EA calculation time and order sent back to the broker.
  3. What do you think the pending order's price is for?

Sorry to interject, but I have a question re this point.

A pending order is placed to buy at 1.30100. However, due to volatility, there is a tick at 1.30090, but the next tick gives the price as 1.30175. Obviously the pending order will become a market order at 1.30175 and NOT at the desired 1.30100. Is there any function that can be added to an EA that would prevent the opening of the pending order when there is such a big distance between the desired entry point and the actual entry point?

Thanks

 
patrick007:

Sorry to interject, but I have a question re this point.

A pending order is placed to buy at 1.30100. However, due to volatility, there is a tick at 1.30090, but the next tick gives the price as 1.30175. Obviously the pending order will become a market order at 1.30175 and NOT at the desired 1.30100. Is there any function that can be added to an EA that would prevent the opening of the pending order when there is such a big distance between the desired entry point and the actual entry point?

There is no function, don't use pending orders and be careful how you select your Broker . . . it seems that the documentation for OrderSend() is incorrect for some Brokers, even if your OrderSend() says open at a price of 10000.000 and you allow no slippage your order will be opened at Bid/Ask . . .

https://www.mql5.com/en/forum/143997/page2#773665

 

Happened to me a few times. What the broker says afterwards is: "The order was sitting in the que, so it was executed automatically on the next tick of the price." It is a lot of BS, if you ask me. But you don't make money by changing rules, only by making your best under existing rules of the game. As for the EA or a function to prevent the trade in such a case - I, for one, never heard of or seen such solution implemented. Guess it simply doesn't work, since when the gap occurs your are at the mercy of your broker.

What happened to me once was a pending buy-stop order with preset 20+pip TP which executed (opened) on a gap, and closed out immideately since price was well above TP also. The trade showed a negative right away! Although have to admit broker zero-ed it out at the end, don't know if he would have done it on his own though.