Errors, bugs, questions - page 431

 
voinG:
If possible, it would be better as in this one on MT4

I am planning to deal with my MT4 projects next week, and the library for migration from MQL4 to MQL5 should be updated (just in the field of indicators).

I will try to deal with your problem till Wednesday. I will send you feedback on Wednesday or Thursday.

 
Interesting:

I am planning to deal with my MT4 projects next week, and the library for migration from MQL4 to MQL5 should be updated (just in the field of indicators).

I will try to deal with your problem till Wednesday. I will write to you in my personal message on Wednesday or Thursday.

Thank you
 

Could you please explain under what circumstances a TRADE_RETCODE_ONLY_REAL error can occur?

And what is the right way to deal with it?

 

Another nuance concerning the order execution type (SymbolInfoInteger(SYMBOL_TRADE_MODE)).

Possible variants:

1. SYMBOL_TRADE_MODE_DISABLED(trading on the symbol is not allowed).
2. SYMBOL_TRADE_MODE_LONGONGLY (Only buying is allowed).
3. SYMBOL_TRADE_MODE_SHORTONLY (Only selling is allowed).
4. SYMBOL_TRADE_MODE_CLOSEONLY (Only closing of positions is allowed).
5. SYMBOL_TRADE_MODE_FULL (No restrictions on trade operations).

Don't you think that clause 2 and clause 3 should in any case include clause 4?

Either it is from the "it's already clear to everyone" category (it would be nice to specify it explicitly in the documentation), or we get nonsense: you can open a position but cannot close it.

Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте - Документация по MQL5
 
voix_kas:

Could you please explain under what circumstances a TRADE_RETCODE_ONLY_REAL error can occur?

What is the best way to deal with it?

TRADE_RETCODE_ONLY_REAL

10032

TRADE_RETCODE_ONLY_REAL

Operation is allowed only for real accounts


This is actually a prohibition on trading the specified symbol for the given account type. For example, trying to trade an exchange instrument with direct execution on a demo account.

A broker may not always provide demo trading on a number of trading instruments.

 
voix_kas:

One more nuance concerning the order execution type (SymbolInfoInteger(SYMBOL_TRADE_MODE)).

Don't you think that items 2 and 3 should anyway include item 4?

Either it is from the "it's clear to everybody anyway" sort of thing (it would be nice to write it explicitly in the documentation), or it is nonsense: you can open a position but cannot close it.

Yes, a complete closing of positions by SYMBOL_TRADE_MODE_CLOSEONLY works with SYMBOL_TRADE_MODE_LONGONLY and SYMBOL_TRADE_MODE_SHORTONLY.

We will try to expand the description of the situation when trading positions are liquidated in the documentation.

 
Renat, thank you for the clarification.
 

There is a discrepancy between the results obtained during single testing and optimization via MQL5 Cloud Network

Optimization results:

Results during single testing:

It seems that during optimization one trade is simply lost due to a problem with quotes history for the last twenty-four hours.

Optimization and testing was conducted on 26.06.11

Build 470

 
MoneyJinn:

The impression is that the optimisation just loses one trade due to a problem with the quotation history of the last 24 hours.

Yes, there is no need to test to the most recent date in existence.

Choose a reasonable fixed end date in the form of 00:00 of the previous working day or even the end of the last working week. If you use the last day all the time, the end of the chart will float periodically, especially if the testing process is long using remote or claud agents.

 

290 in total and... on)

Total overkill makes 290.

I take it that there is no pass (real run) but it is fixed (if there are matches)?

Reason: