Problems with showing results of doubles

 

I have the following code:

double RangeSize = High[1] - Low[1]; 

Comment ("Range = " + RangeSize) 

It shows 0.00099000

If i want it to show it in pips (like 9.9pips) . How can i do that?

What is the correct if-sentence if i want to ask if RangeSize is lower than 5pips?

 

Divide by Point but you also have to adjust if you are on a 5 digit broker rather than a 4 digit broker.

Plenty has been written about adjusting for 4/5 digit brokers, do a search.

 

Thanks Raptor!

Sorry to say it but it's difficult to find anything in here.

I will try to look for Point and adjusting for 4/5 digits brokers

 
EagleEye:

Thanks Raptor!

Sorry to say it but it's difficult to find anything in here.

A tip for you, search using Google, e.g. site:forum.mql4.com adjust 4 5 digit broker (the site bit just searches this site . . .) http://crum.be/45digit
 

Ok thanks Raptor!

Ok now I have tried RangeSize/Point and RangeSize*Point but the comment line still show me 0.00099000 and not 9.9 pips

What am i doing wrong?

 
EagleEye:

Ok thanks Raptor!

Ok now I have tried RangeSize/Point and RangeSize*Point but the comment line still show me 0.00099000 and not 9.9 pips

What am i doing wrong?


I think i found something here i can use : https://www.mql5.com/en/forum/130386
 

On my MBT platform (5 digit) for GBPUSD Point is 0.00001 so if your range value for GBPUSD is 0.00099000 and you divide that by point (0.00001) you get 99 . . . you need to adjust for 4/5 Digit brokers . . then you would get 9.9

Look here: https://www.mql5.com/en/forum/134305 where it says "You're adjusting TP and SL for 5 digit brokers, but you must ALSO adjust slippage" you can use that code and use the pips2dbl variable instead of Point

Reason: