This forum is in read-only mode now. You may discuss your questions on forums of MQL4.community and MQL5.community

5 Digits Price


Back to topics list
avatar
72
Wackena 2008.05.16 00:20 
When using Brokers that have 5 digits in price, selecting to show profit as "points" is not correct. The "points" have an extra "0".

avatar
394
sub 2008.05.17 03:39 
When using Brokers that have 5 digits in price, selecting to show profit as "points" is not correct. The "points" have an extra "0".




From the mathematics, we know that least significant "0", following decimal point, has no effect on the value. i.e. 1.0020 is same as 1.00200000
avatar
61
lyes 2008.06.04 15:48 
There is no decimal point, instead of 10 points , it will show 100 points.... Points constant variable also is /= 10 btw


avatar
1
megrim 2009.08.26 17:06 
   int diff_digits = 4 - MarketInfo("EURUSD", MODE_DIGITS);
   double PIP = 1 / MathPow(10, (MarketInfo(Symbol(), MODE_DIGITS) + diff_digits));

This is a small formula hack to autodetect a multiplier in order to get PIPs. Knowing that EURUSD has 4 digits normally. Instead of multipling/dividing the price with Point variable, use PIP as replacement.


EURUSD (5 digits broker):
Point = 0.00001 PIP = 0.00010


EURUSD (4 digits broker):
Point = 0.0001 PIP = 0.0001


GBPJPY (5 digits broker):
Point = 0.001 PIP = 0.010


GBPJPY (4 digits broker):
Point = 0.01 PIP = 0.01


May be I'm doing it the hard way, but if anyone has a non-hack solution please share :)

Back to topics list  
Download MetaTrader 5 (450 Kb, web installer) — a new terminal for financial markets