[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 79

 
Judging by the log, on the second attempt, the order still did not open before refreshments. There is a suspicion that there is something wrong with the DC.
 
grell:
Judging by the log, on the second try, the order still did not open before refreshRates. I have a suspicion that there is something wrong with the DC.

It's also possible. But I don't see any connection between your code and RefreshRates()... :|

What, by the way, are your EA's signals based on?
 
A self-made multi-currency maker, namely the intersection of currency lines, which is why the market info is everywhere in the code.
 

Hello old timers!

The other day for the first time I caught error 138 (requotes) from dealer on EURUSD, MT4 build 402, and position was not opened, although slippage was 1000. According to dealer's logs, price went only 30 pips in the better direction.

Therefore, the question is whether it is the dealer's error, the terminal error or my own stupidity in writing the Expert Advisor. It is clear that errors must be handled, but I naively thought that slippage=1000 would save me from requotes and positions would be opened at any price

 
kott:

Hello old timers!

The other day for the first time I caught error 138 (requotes) from dealer on EURUSD, MT4 build 402, and position was not opened, although slippage was 1000. According to dealer's logs, price went only 30 pips in the better direction.

Therefore, the question is whether it is the dealer's error, the terminal error or my own stupidity in writing the Expert Advisor. I understand that errors must be handled, but I naively thought that slippage=1000 would save me from requotes and a position would be opened at any price

Search, search and search again...

Here is one of the search results: https://www.mql5.com/ru/forum/104990/page5.

 
MaxZ:

Search, search and search again...

Here is one of the search results: https://www.mql5.com/ru/forum/104990/page5.

I've done the search before - it gives you so much that you won't be able to solve it in a week :)

your link has only one thing to say - slippage works in a slow market and not in a fast one :)

hence the 1 - question - what's a fast market and what's not? I don't trade on the news, so don't cite this option :)

The last time the position opened 9 ticks after the request and at 10 pips difference - is it like a slow market? And re-quotes I have received after 10 ticks and at a price difference of 30 pips - is it a fast market?

And second, slippage is controlled by a dealer and the dealer can "put" on it if he wants - then what is the point of this parameter, it works then not, and it must be handled manually by 138 anyway?

 
kott:

As the dealer treats the customer, so will the customer treat the dealer! :)))

No one is "putting any weight" on anything. There is a threshold of reasonable slippage. There is no point in exceeding it.

If the volatility is high, it's really difficult to open an order at a declared price. Also price jumps of 3-5 points (4-digit quotes) and more are possible.

And why do you have such long requests (9, 10 ticks)? Is it a real account? Are the quotes in 5 digits?

 
MaxZ:

As the dealer treats the customer, so will the customer treat the dealer! :)))

No one is "putting any weight" on anything. There is a threshold of reasonable slippage. There is no point in exceeding it.

If the volatility is high, it's really difficult to open an order at a declared price. Also price jumps of 3-5 points (4-digit quotes) and more are possible.

And why do you have such long requests (9, 10 ticks)? Is it a real account? Are the quotes in 5 digits?

I deliberately set slippage=1000 to tell the server "I don't care where the price went, I don't care if the market is fast or slow - I want to open according to the market". So who is ignoring slippage - the dealer's server or the terminal?

Yes, my account is real, the quote is in 5 digits on EURUSD. I don't understand why it takes so long to process the orders myself. I don't pay attention to time and quotes before requote.

I open at the close of the candle. The Expert Advisor does not seem to be very long.

When I caught requotes, the price smoothly enough for 10 ticks (4 seconds) went from 1.42212 to 1.42242 (Bid, I asked to sell)

 
MaxZ:

And let it move to both! :)))))

An example of how huge, hard-to-read code can be optimised down to ten lines...

Although:

p.s.: I would never use such a Tralling, but it fits the logic of Dimka-novitsek.


Thank you!!!
 
kott:

So who is ignoring slippage - the dealer's server or the terminal?

I don't know.

kott:

I don't know why it takes so long to process requests myself.

I trade on a real account.

kott:

I open at the close of a candle. The Expert Advisor is not very long.

When I caught requotes the price smoothly enough for 10 ticks (4 seconds) went from 1.42212 to 1.42242 (Bid, I asked to sell).

I will have to insert into the EA a code to handle requotes. Apparently it was a strong movement at that moment. And maybe the brokerage company is so special.

I have nothing else to say. I don't think I am a pro, but it's hard to go past this thread. Let other people share their opinions. It will be interesting to read. It's a holiday today and the volatility in this forum is very low...

Reason: