Resolution problem ?

 

I was debugging an indicator's code, when I noticed that while trying to

square a double var. less than .001, I get zero.

ex.

double a1 = .001; // declaration

double Sq;

Sq = a1*a1; // Sq = 0 ????

I thought it might be resolution, I tried it on computers, The help files

say that a double var is good to 1.7 e^-308...should be no problem !!

I emailed tech support, they said my code was faulty!

I wrote a program with only the lines above and did a print to get output.

Still = 0 !!!!!

help...thanks

 

I will respond to my own post !!

I figured out that it was a print problem..if you exceed 4 digits printing a double variable it gets truncated.....

use the DoubleToString( value, digits ) function...

everything is OK now

 

Hi there!

Do you know this indicator? Dyn_Pivot? it redraws him self can you solve this problem?

Files:
dyn_pivot.mq4  5 kb