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
I have for a long time used the Point variable to convert pips to points in my MQL4 programs. For example, if I want to calculate a stop loss value for a buy trade, I would multiply the required number of pips by Point and subtract the result from the Ask price.
The broker I use - Alpari - have today decided to add an extra decimal place to all of their quotes. This means that open trades when viewing "profit as points" are showing values 10 times bigger (e.g. a 10 pip profit is showing as 100 points).
It also means that the value of the Point variable been changed, for example on the GBP/USD, from 0.0001 to 0.00001. This has an adverse effect on calculations like the one shown above, as the resultant stop loss ends up being 2 pips away instead of 20.
Can anyone suggest a way, apart from hardcoding the pip value for each currency, of converting pip values to points and vice versa, which will work regardless of how many decimal points any given broker decides to use?
Thanks,
Greg