You buy at the ask and sell at the bid. I cannot see if your positions are long or short. Turn on the bid and ask lines on the chart (right click on the chart, select properties, click the "Show" tab, and turn on the ask line). If you have a short position, to close it you must buy at the ask, so the ask price is the relevant price when calculating profit. I suspect your spread (Ask - Bid) = 9 points (.64652 - 0.64643) at that moment in time when you captured the screen shot.
Thank you! Got it, you're right its a 9 pip spread
Hookway #: ! Got it, you're right its a 9 pip spread
Wrong, it's 9 points. A PIP is not a point.
PIP, Point, or Tick size are all different in general.
Ticks, PIPs or points in the GUI. Make up your mind. - MQL4 programming forum #1 (2014)
Percentage in point - Wikipedia
Unless you manually adjust your SL/TP for each separate symbol, using Point means code breaks on 4 digit brokers (if any still exists), exotics (e.g. USDZAR where spread is over 500 points), and metals. Compute what a logical PIP is and use that, not points.
How to manage JPY pairs with parameters? - MQL4 programming forum (2017)
Slippage defined in index points - Expert Advisors and Automated Trading - MQL5 programming forum (2018)

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
Hello
Re:attached
the prices on the chart differ from the price used to calculate the PnL
In the example in the image attached
the AUD price is 0.64652 for PnL purposes
but it is 0.64643 on the chart
Is one the real time price, and another delayed or is it the spread, there some other cause for the difference?
Please let me know