Because mt5 will always have only one position of a symbol, can we just use PositionGetDouble(POSITION_VOLUME) to obtain the current volum of the position?
No, don't replace them. Use these functions to collect the profit for the entire history. Select the history, go through all deals and summarise their profit, swap, commission.
the following has been noticed: when many Expert Advisors work on one account (FORTS, Otkritie), the aggregate position can be equal to 0, while the Expert Advisors are in positions.
accordingly, the point of zero position may change to a new, current point of zero aggregate position, but then the experts using the class lose their positions.
it seems that it is necessary not only to find the point of cumulative zero position, but also to check that any expert on this symbol and in this point does not have a position.
But the question arises, for example, what if some expert has been removed and his pose is covered with his hands?
Help me to understand how these classes and OOP work. Let's say we have connected this class to an Expert Advisor, is it executed only when accessing it from the Expert Advisor? Or it works in parallel and gives only results on request?
the following warnings and errors were noticed during compilation in mql5: possible loss of data due to type conversion from 'long' to 'int' eposvoltest.mq5 426 20 , possible loss of data due to type conversion from 'long' to 'datetime' eposvoltest.mq5 439 32, possible loss of data due to type conversion from 'long' to 'int' eposvoltest.mq5 456 26, possible loss of data due to type conversion from 'long' to 'int' eposvoltest.mq5 491 23, return value of 'OrderSend' should be checked eposvoltest.mq5 236 4, return value of 'OrderSend' should be checked eposvoltest.mq5 268 4, '-' - expression not boolean eposvoltest.mq5 279 14, 'MQL5_TESTING' is deprecated, use 'MQL_TESTER' instead eposvoltest.mq5 335 23, 'MQL5_TESTING' is deprecated, use 'MQL_TESTER' instead of eposvoltest.mq5 346 23
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.
I didn't understand the last sentence, Integer, if it's not too much trouble, explain what you meant to say
I guess you suggest replacing PositionGetDouble(), POSITION_COMMISSION, POSITION_SWAP, POSITION_PROFIT. with HistoryDealGetDouble(), DEAL_COMMISSION, DEAL_SWAP, DEAL_PROFIT.
.
HOW TO WITHDRAW MONEY FROM FOREX, OR HOW TO TRANSFER IT TO WEBMANI.
New Article The best way to calculate the total position by specifying the number of phantoms has been published:
By Dmitry Fedoseev
the following has been noticed: when many Expert Advisors work on one account (FORTS, Otkritie), the aggregate position can be equal to 0, while the Expert Advisors are in positions.
accordingly, the point of zero position may change to a new, current point of zero aggregate position, but then the experts using the class lose their positions.
it seems that it is necessary not only to find the point of cumulative zero position, but also to check that any expert on this symbol and in this point does not have a position.
But the question arises, for example, what if some expert has been removed and his pose is covered with his hands?
Good afternoon.
Help me to understand how these classes and OOP work. Let's say we have connected this class to an Expert Advisor, is it executed only when accessing it from the Expert Advisor? Or it works in parallel and gives only results on request?
the following warnings and errors were noticed during compilation in mql5: possible loss of data due to type conversion from 'long' to 'int' eposvoltest.mq5 426 20 , possible loss of data due to type conversion from 'long' to 'datetime' eposvoltest.mq5 439 32, possible loss of data due to type conversion from 'long' to 'int' eposvoltest.mq5 456 26, possible loss of data due to type conversion from 'long' to 'int' eposvoltest.mq5 491 23, return value of 'OrderSend' should be checked eposvoltest.mq5 236 4, return value of 'OrderSend' should be checked eposvoltest.mq5 268 4, '-' - expression not boolean eposvoltest.mq5 279 14, 'MQL5_TESTING' is deprecated, use 'MQL_TESTER' instead eposvoltest.mq5 335 23, 'MQL5_TESTING' is deprecated, use 'MQL_TESTER' instead of eposvoltest.mq5 346 23
10.09.2025