I would like to know that what is the different? from 2 digits 4 digits and 5 digits in term of programming.
My understand is that using pip to price calculate would be ok to handle the different. Do this correct?
Few years ago all brokers had a maximum of 4 digits. For some symbols (like USDJPY) they had 2 digits.
Pips was always related to the last digit (4th or 2nd).
Then micrlots came up, the brokers had to be more precise. Thus the increased the digits by one.
Nowadays all brokers have 5 or 3 digits. But the relation of Pips stays to the 4th (2nd) digit.
On a 5 digit symbol (EURUSD) a change from 9.12345 to 9.12356 is a change of 1.1 pips.
On USDJPY a change from 9.123 to 9.134 is also 1.1 pips.
(2 digits are still used symbols outside of forex - but the do not used pips at all)
thank you very much.
It make me confuse now!!
I calculate pip=MODE_TICKSIZE,
but some time ticksize can be 0.012 or some thing like that. If this happen, stop-loss or take-profit will wrong and far away.
So how to get the pip? is MODE_TICKSIZE correct?
Ticksize is the smallest price-change a symbol can make.
Again: pips are the 4th / 2nd digit after the decimalpoint - for any symbol at forex