Errors, bugs, questions - page 2128

 
Vladimir Karputov:

Please enclose clean MQL5 code in your MQL5 questions.

The bug is not related to MQL5.

 
Vladimir Karputov:
I'm sick and tired of seeing your HAPPY advertisements on and off.

What kind of advertising?

 
Comments not related to this topic have been moved to "Questions from MQL5 MT5 MetaTrader 5 beginners".
 
fxsaber:

Opening BUY hand positions on two demo trading servers


RoboForex-MetaTrader 5


FXOpen-MT5

Lines of the same colour mean the same thing. However, it's clearly seen that they are in different sequence. For Robo, the message about order execution comes after the trade is executed. In open it comes BEFORE! For this reason OrderSend returns luck, but no transaction yet. I.e. we get OrderSend unsynchronized with history, which is a bug. What is the reason?

If the order is sent to an external trading system, the MetaTrader 5 trading server does not wait for a response from it, and immediately returns the result of the request as "order placed. For this reason, OrderSend will always return deal=0, as there is no information about the executed trade yet. Catch it in OnTrade or OnTradeTransaction.

An example of a trade event listener is given in the article Where to start when creating a trading robot for the Moscow Exchange MOEX - TradeTransactionListener.mq5

 
Rashid Umarov:

If an order is sent to an external trading system, the MetaTrader 5 trading server does not wait for a response from it and immediately returns the result of the request as "order placed". For this reason, OrderSend will always return deal=0, as there is no information about the executed trade yet. Catch it in OnTrade or OnTradeTransaction.

Catch it without OnTrade*. It turns out that all trade servers that return Result.deal != 0 on market requests don't output anything?

Who has a real exchange, tell me, what is Result.deal after successful OrderSend (not Async) of a market order?

 
Can you tell me how to determine the minimum distance from the current price to place a pending order?
 
Maxim Khrolenko:
Can you tell me how to determine the minimum distance from the current price to place a pending order?

Tool information

int stopLevel = (int)SymbolInfoInteger(Symbol(), SYMBOL_TRADE_STOPS_LEVEL);
 
Vladislav Andruschenko:


Hi all.

Has anyone encountered this error when optimising in the cloud on Open Prices only ?


The error is not constant. I.e. it occurs "very rarely" but when I run 10,000 results , it pops up 50 times.

I do not change TF during optimization.

All this has been described long ago. https://www.mql5.com/ru/articles/239

There are some limitations on the "Open prices only" mode:

  • You cannot use the "Arbitrary delay" trading mode;
  • You cannot access data of a lower timeframe than that used for testing/optimization in an Expert Advisor under test. For example, if testing/optimization is performed on H1 timeframe, you can access data from H2, H3, H4, etc., but not from M30, M20, M10, etc. In addition, the higher timeframes that are referred to must be a multiple of the testing timeframe. For example, when testing on the timeframe M20, you cannot refer to the timeframe M30, but you can refer to H1. These limitations are connected with the impossibility to obtain data of lower or non-multiple timeframes from the bars generated during testing/optimization.
  • Limitations on accessing data of other timeframes also apply to other symbols whose data are used by the Expert Advisor. However, in this case a limitation for each symbol is the first timeframe, which has been accessed during testing/optimization. For example, during testing EURUSD H1, an Expert Advisor accesses GBPUSD M20 for the first time. In this situation an Expert Advisor can further use EURUSD H1, H2, etc., as well as GBPUSD M20, H1, H2, etc.
Основы тестирования в MetaTrader 5
Основы тестирования в MetaTrader 5
  • 2011.03.28
  • MetaQuotes Software Corp.
  • www.mql5.com
Идея автоматической торговли привлекательна тем, что торговый робот может без устали работать 24 часа в сутки и семь дней в неделю. Робот не знает усталости, сомнений и страха,  ему не ведомы психологические проблемы. Достаточно четко формализовать торговые правила и реализовать их в виде алгоритмов, и робот готов неустанно трудиться. Но прежде...
 
Hi all, is it just me who's having trouble with the vault? Or is it some kind of bug? I create a folder on my computer, add a folder to the repository, send a change to the repository and everything.....pis - that changes have been sent, but the folder with the file in the repository does not appear! So everything is connected.... Or maybe it's complicated as always and I'm doing something wrong)))
 
Tango_X:
Hi all, is the repository not working just for me? Or is it some kind of bug? I create a folder on the computer, add a folder to the repository, send changes to the repository and all.....write that the changes are sent, but a folder with the file in the repository does not appear! So everything is connected.... Or maybe it's complicated as always and I'm doing something wrong)))

Have you connected a new Warehouse or are you experimenting on the old Warehouse?

New version of MetaTrader 5 build 1730: Projects in MetaEditor and synthetic tools:

Changed protocol for working with MQL5 Storage
The protocol for working with the online MQL5 Storage has been changed to support new group projects. Unfortunately, after updating to a new version of the platform, you will need to re-extract all the data from the storage. The data stored there will not be affected or lost.

Before you upgrade to a new platform version, we recommend that you send all local changes to the repository (do a Commit).