Are you taking the SPREAD into the calculation?
Ahh, I see you've written you did, but actually not. You can open a short position at the BID price, but closing is possible only at the ASK.
deVries:
I think the OP wants to calculate potential profit prior to placing the order.
RaptorUK:
I think the OP wants to calculate potential profit prior to placing the order.
I think the OP wants to calculate potential profit prior to placing the order.
Thanks in that case my posting was wrong so I deleted it. Good weekend Simon

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
Hi,
I am having problems in calcuating the exact expected profit and loss.
Below is the code.
Even if my position closes at exactly the specified TP and SL I seeing variation in actual profit and loss.
I believe I accounted the spread in the below code.
Please verify and help me.