Double type is not accurate enough ! How can I do ?

 

Hi everybody !

 

As my title said, double type just record 4 number after the comma. Quite a problem when you trade on EURCHF with 5 number after the comma.... I tried to transform my double variable with DoubleToStrMorePrecision but it didn't work ? Did some research on the forum too...

It would be very cool if someone could give the solution !

 

Thanks a lot ! 

 
afterrage:

Hi everybody !

 

As my title said, double type just record 4 number after the comma. Quite a problem when you trade on EURCHF with 5 number after the comma.... I tried to transform my double variable with DoubleToStrMorePrecision but it didn't work ? Did some research on the forum too...

It would be very cool if someone could give the solution !

 

Thanks a lot ! 

There are no commas in numbers, you mean decimal point?

How are you viewing the double?

Try

 Print(DoubleToStr(Bid,Digits));

Strange, I am unable to use SRC. Tried in a new post as well. It inserts ok, but does not appear when posted 

 
afterrage:

Hi everybody !

 

As my title said, double type just record 4 number after the comma. Quite a problem when you trade on EURCHF with 5 number after the comma.... I tried to transform my double variable with DoubleToStrMorePrecision but it didn't work ? Did some research on the forum too...

It would be very cool if someone could give the solution !

 

Thanks a lot ! 


 Something  wrong, DOUBLE can hold   52 bits in Fraction, it's a really  Huge Number.

Please double check.

 
georget11:  Something  wrong, DOUBLE can hold   52 bits in Fraction, it's a really  Huge Number.
53 bits is approximately 15 digits.
afterrage: It would be very cool if someone could give the solution !
  1. You need to post a problem and your broken code. "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
  2. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it.

  3. double t = 10/81.;
    Print(DoubleToString(t,15)); // tests USDCHF,H1: 0.123456790123457
    
 

Thanks a lot guy ! Have problem to use "print" in my indicator to show the "real" value and not just X.XXXX, got another question, i'll create another topic

 

Okay np WHRoeder 

Reason: