many posts here are about this problem. However, it seems this is not solved and the desk did not answer for this so far or in russian language.
The Problem: i do a trade , entry at price p1 and exit at price p2. MetaTrader shows the profit for this trade.
I like to calculate this profit with MQL5 methods, exactly this profit, so profit in account currency.
How to do this, given i have
The method used is uselessly overcomplicated.
If it's buggy, then ask the correction of the bug.
Why did you remove your post ?
thank you for replies gentlemen.
Can one of you give a simple formular for my problem ? So other users, having the same problem can just copy this formular.
I know about SYMBOL_TRADE_TICK_VALUE but it simply not works. When i evaluate a trade report about fill price of a position
opened and price when position closed and resulting profit i can't calculate this profit using SYMBOL_TRADE_TICK_VALUE.
Of course in my tests no other symbols were opened at this time.
If you can calculate exaclty the profit, please just post your formular here and this problem should be solved for all times.
output: costs in account currency.
(I mentioned the desk because i posted my question there along with detailed sample, screenshots, my code for this
and got no really helpful answer. )