You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Not at all.
I did nothing, it's all "normal" trades open and close in a standard way, CLOSE_BY was not used.
Here the most significant trades (difference between profit calculated with ask or bid greater than 0.02) :
Only 1 is following "your" logic. Why only one ?
I have no explanation, it is as it is. It's mainly losing trades, but that's because the P/L is greater when in loss
If I checked more trade (diff 0.01), I got :
Doesn't make sense to me.
I will check more accounts, and also check it live.
Here the most significant trades (difference between profit calculated with ask or bid greater than 0.02) :
Only 1 is following "your" logic. Why only one ?
I have no explanation, it is as it is. It's mainly losing trades, but that's because the P/L is greater when in loss
If I checked more trade (diff 0.01), I got :
Doesn't make sense to me.
I will check more accounts, and also check it live.
I only use prop firms with USD now but when I first started I had to decide if my CAD deposits would be made in an account with CAD as the base currency or if I would create an account with USD as the base currency, in which case the broker would convert the deposited funds and charge a conversion fee. I'm not sure if my instincts were correct but since most pairs I trade are denominated in USD, I always thought it would be safer to use USD as my account's base currency because I feared that otherwise I would end up being screwed with a conversion fee (spread) everytime I close a trade. Maybe that's what's happening to you. Not sure though. My guess is it might be different depending on how your broker handles each account base currency, but since I now only use accounts with USD as the base currency, I don't worry about this anymore.
for example, I found this:
Only 1 is following "your" logic. Why only one ?
I have no explanation, it is as it is.
What I can see is that it is the only one with the account currency (EUR).
This broker shorts the conversion pair for the long trades, and longs it for the short ones.found something else (for the same broker):
"********* will automatically convert currencies when trading non-GBP denominated securities. To do this, ************* will engage in “spot” currency transactions on your behalf in order to settle your buy orders or convert the proceeds of a sell order."
This is why I wouldn't be surprised if trade profit conversion to account currency could be done differently based on what broker you use and what's your account currency.
What I can see is that it is the only one with the account currency (EUR).
This broker shorts the conversion pair for the long trades, and longs it for the short ones.My final conclusion:
Profit calculations using OrderCalcProfit() and tick values are matching, but they do not match their actual values. The actual profits (either floating or closed) that we get on the platform can not be explained by any means and do not follow any logic. There is something strange happening on the server side. Only the developers of the platform have the proper explanation.
@Alain Verleyen I think your research into profit calculation of the closed trades will yield nothing at the end, like mine on live positions.
My final conclusion:
Profit calculations using OrderCalcProfit() and tick values are matching, but they do not match their actual values. The actual profits (either floating or closed) that we get on the platform can not be explained by any means and do not follow any logic. There is something strange happening on the server side. Only the developers of the platform have the proper explanation.
@Alain Verleyen I think your research into profit calculation of the closed trades will yield nothing at the end, like mine on live positions.
When you say the actual profits you get on the platform aren't matching, what if you use my script (see below link)? What I'm wondering is if the profits you see on your closed position (in your history) doesn't match the calculations, do the calculations from my script match the profits you see if you hover over your position's Stop Loss on the chart while the position is still open? Does the discrepancy affect these profit calculations while the position is open or does it only affect the true profits you get after the position is closed?
https://www.mql5.com/en/forum/441959/page6#comment_45209672
Please refer to post #35 for the analysis I did on live positions. https://www.mql5.com/en/forum/439319/page4#comment_45156522
Live (floating) profits calculations using OrderCalcProfit() and tick values are matching exactly and they follow the rules for the profit -> account currency conversion rates.
However, the actual profit reported by the terminal (POSITION_PROFIT field) cannot be re-calculated with any equation.
Forum on trading, automated trading systems and testing trading strategies
Serious bug in the OrderCalcProfit() function
amrali, 2023.02.21 23:35
Here is the result from the EUR account:
Here is the result from the USD account:
As can be seen POSITION_PROFIT is sometimes (but not always) equal to profit calculation using OrderCalcProfit(). The reason for this may be a timing (sync) issue between the ticks on the server used to calculate the POSITION_PROFIT field and the later ticks reaching the terminal. So, my conclusion is that the value of the POSITION_PROFIT field is calculated on the server, independent of the quote data arriving to the terminal in that exact moment.
Please refer to post #35 for the analysis I did on live positions. https://www.mql5.com/en/forum/439319/page4#comment_45156522
Live (floating) profits calculations using OrderCalcProfit() and tick values are matching exactly and they follow the rules for the profit -> account currency conversion rates.
However, the actual profit reported by the terminal (POSITION_PROFIT field) cannot be re-calculated with any equation.
Ok, I'll review those in case I can figure out if we're missing something.
By the way there was something missing in my code and the example you provided to make sure the conversion logic is not applied to CFD pairs so I posted the update in the other thread if you want to check it out.