MQL4: Converting pips to points

 

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

 

I think there's a problem with the way Alpari have implemented the extra decimal place. I spoke to someone there and they're looking into the problem.

 
Heh I just emailed Alpari about the same thing :P screws up my chart reading skillz.