Assumption: from the code above you incorrectly calculate the volume (or rather incorrectly check the possibility to open with this volume) - you use TOTAL free margin, instead of free margin after opening a position. You should also check beforehand what is set in m_symbol.LotsLimit()
Торговая деятельность в платформе связана с формированием и отсылкой рыночных и отложенных ордеров для исполнения брокером, а также с управлением текущими позициями путем их модификации или закрытия. Платформа позволяет удобно просматривать торговую историю на счете, настраивать оповещения о событиях на рынке и многое другое. Открытие позиций...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Need to close a BUY position.
Assumption: from the code above you incorrectly calculate the volume (or rather incorrectly check the possibility to open with this volume) - you use TOTAL free margin, instead of free margin after opening a position. You should also check beforehand what is set in m_symbol.LotsLimit()
Here used before, also the same errors, at the bottom checks the limit.
I have specially created a test EA, this EA undergoes validation.
I do the same checks for the desired EA, and there are errors.
I have specially created a test EA, this EA undergoes validation.
I do the same checks for the desired EA, there are errors there.
You are not reading at all: why are you using ALL free margin, instead of free margin after opening a position?
All in all read and re-read the article.
Added: Just checked my latest code - in the Trading Signals function I have specifically added coefficient - to involve LotCheck
The Expert Advisor has passed validation with a bang.
It's not clear.
.
It's not clear.
It says: huge log file. Doesn't fit on disk, so testing is interrupted. Use the translator.