Is this in MQL code or on the chart?
If this is for code, then it is a very basic request, so I am assuming you have not studied MQL programming at all. So I would suggest to start your learning by studying various examples in the CodeBase and the with the help of the documentation, make small changes as you experiment and learn and improve your coding skills in MQL.
If however, your question is about a very specific case, then show your code attempting this and we will help guide you to resolve the issue.
When in doubt, think! | double openPrice = OrderOpenPrice(); // Or MT5 double marketPrice = OrderType() == OP_BUY ? Bid : Ask; // equivalent. double differencePoints = (marketPrice - openPrice) / _Point; double differencePips = (marketPrice - openPrice) / PIP(); |
Is this in MQL code or on the chart?
If this is for code, then it is a very basic request, so I am assuming you have not studied MQL programming at all. So I would suggest to start your learning by studying various examples in the CodeBase and the with the help of the documentation, make small changes as you experiment and learn and improve your coding skills in MQL.
If however, your question is about a very specific case, then show your code attempting this and we will help guide you to resolve the issue.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
how can i calculate diference of pips or points between openprice order and market price ?
thanks