| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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 ![]() |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with .ex4................. | EFX | General Discussion | 4 | 10-21-2006 07:23 AM |
| Problem with BGcross EA | Andrewsurfer | Expert Advisors - Metatrader 4 | 2 | 05-26-2006 06:13 AM |
| Backtesting Problem | juanchoc | Expert Advisors - Metatrader 4 | 3 | 05-23-2006 03:26 PM |
| My First EA problem | demag | Questions | 4 | 02-10-2006 08:18 AM |
| I've a Problem here | hellkas | Metatrader 4 | 6 | 11-04-2005 12:30 AM |