Errors, bugs, questions - page 2492

 

Is it normal that agents don't free up RAM after completing a task in the cloud?



Version 2085, June 13, 2019.

Holds RAM for at least 1 hour.

 
SEM:

Is it normal that agents do not free up RAM after a task in the cloud?


The question is not complete. How long do your agents hold the memory? What is the build of the terminal?

 
A100:

Error during execution:

Result : 1

Expectation: 2 or (as in C++) - compilation error

Thanks for the post!

MQL5 does not support overriding (and/or hiding) class methods.

If I remember correctly, we already discussed this feature several years ago, although it was a question of which overload should be called closest in inheritance or more exact in terms of parameters.


In the new version of the compiler, overriding will work like in C++.

That is, when you override a parent method, it will only be possible to call it using "b.A::f()", an attempt to call b.f(10) will result in an error, method b.f() - has no parameter, and method A::f(int) is not available (hidden), because it is overridden.

 
Vladimir Karputov:

The question is not complete. How long do your agents keep memory? What is the build of the terminal?


Modified it.

Forum on trading, automated trading systems and trading strategies testing

Bugs, bugs, questions

SEM, 2019.07.01 09:03

Is it normal that agents don't free RAM after performing a cloud job?



Version 2085, June 13, 2019.

Holds RAM for at least 1 hour.


 

I want to bring up the "weighted average price problem" again in CPositionInfo description, PriceOpen() command

Forum on trading, automated trading systems and strategy testing

Service Desk. Complaints, suggestions.

Francuz, 2019.06.13 11:36

Error in standard library description

Specifically in the description of CPositionInfo, PriceOpen() command

https://www.mql5.com/ru/docs/standardlibrary/tradeclasses/cpositioninfo/cpositioninfopriceopen

The returned value is not "opening price" but"weighted average opening price"

As an example:

We open a position for 1 lot at the price of 61532. In this case, PriceOpen() will return 61532.

We additionally increase our position by 1 lot at 61615. In this case, PriceOpen() will return the weighted average price of two lots 61573.5, not the opening price of the position.

I would like to see not only a single word correction in the description, but also a brief explanation-illustration.


Theweighted average openingpriceproblem has unpleasant consequences.

The thing is, if you increase a position to the amount which can't be divided without the remainder, pennies are divided, and they are lost when rounding. As a result, the balance does not add up at the end. All transactions are carried out purely in whole rubles, but the final balance does not converge because of the lost kopecks.

Scheme of reproducing the error with the loss of kopecks in the balance, even in manual trading.

Buy 1 lot at an even price, buy 1 lot at an odd price, buy 1 lot at an even price, sell 1 lot, sell 1 lot, sell 1 lot.

I will additionally explain what the error is:

Explanation

Column "A" is the actuals (transaction prices). Column "B" is a derivative of column "A" with a loss of accuracy. Any qualified accountant will explain that the balance sheet should only be reconciled to the actuals, and never to the loss-of-fidelity derivatives.

The penny is not just incorrectly displayed in the terminal, it actually moves between the client's and the broker's accounts. Any lawyer or tax officer will tell you that this is a "scam" and could be the subject of a legal dispute between the trader and the broker.

What is it?

Confirming the claim that the pennies are really lost is the implementation of a correction after a considerable period of time. What kind of correction? Why such strange volumes?

Документация по MQL5: Стандартная библиотека / Торговые классы / CPositionInfo / PriceOpen
Документация по MQL5: Стандартная библиотека / Торговые классы / CPositionInfo / PriceOpen
  • www.mql5.com
Стандартная библиотека / Торговые классы / CPositionInfo / PriceOpen - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Francuz:

I want to bring up the "weighted average price problem" again in the CPositionInfo description, PriceOpen() command

Let's check it out.

It will help us a lot if you give us your investor password temporarily for a couple of hours in your personal account. We want to check prices and possible roundings in your transactions table. You will be contacted.

Confirming the statement that pennies are really lost, is to perform a correction after a significant amount of time. What kind of correction? Why in such strange volumes?

A correction is different.

 
MetaQuotes Software Corp.:

Let's check it out.

It will help us a lot if you give us your temporary investor password for a couple of hours. We want to check prices and possible roundings in your spreadsheet. You will be contacted by.

Correction is different.

Otkritie Broker

Server : Open-Demo
Login : 1010955
Password : B7NhSEwx
Investor : B7NhSEwx (read only password)

In the demo, the investor password is the same as the account password, so there is no difference between the two.
 
Торговые сигналы для MetaTrader 5: Error
Торговые сигналы для MetaTrader 5: Error
  • www.mql5.com
Символ Сделки Sell Buy Символ Общая прибыль, USD Убыток, USD Прибыль, USD Символ Общая прибыль, pips Убыток, pips Прибыль, pips Точечные графики распределения MFE и MAE Для каждой открытой позиции в течение ее жизни записываются значения максимальной прибыли (MFE) и максимального убытка (MAE). Эти показатели дополнительно...
 
Ilyas:

If I remember correctly, we already discussed this feature several years ago, although we were discussing which overload should be called closest by inheritance or more exact by parameters.

Yes... I remember... C++ uses the nearest inheritance overload - so that subsequent changes in base classes (appearance of a new parameter-precise overload) wouldn't affect the order of calculations in derived classes (this new overload would not be invoked)

Please note the following:

void f( int a,     int b = 2 ); //(1)
//...
void f( int a = 1, int b     ); //(2) //Error: 'b' - missing default value for parameter
//...
void f( int a, int b ) {}

It seems to be a trifle - just write

void f( int a = 1, int b = 2 ); //(2) //нормально

and be happy, but the point is exactly, that it is not necessary twice or more times to write b = 2, and hence at further change on, say: b = 3 - it will be necessary to change only in one place (and not in two or more), and hence (taking into account distribution of the program) it is impossible to forget to do it in other places

 

Help

2019.07.02 19:41:56.305 my_HMA7C_121 (FTSE100,H6)       BarsCalculated() вернул -1, код ошибки 4806

ERR_INDICATOR_DATA_NOT_FOUND

4806

Requested data not found

At the same time, the indicator on the chart is displayed normally.

What should I do?