Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > Metatrader 4


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

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-10-2006, 07:26 PM
Junior Member
 
Join Date: May 2006
Posts: 4
CaptainVideo is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 08-03-2006, 09:53 PM
Junior Member
 
Join Date: May 2006
Posts: 4
CaptainVideo is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-03-2006, 09:57 PM
Junior Member
 
Join Date: Nov 2005
Posts: 14
HugoGon is on a distinguished road
Hi there!

Do you know this indicator? Dyn_Pivot? it redraws him self can you solve this problem?
Attached Files
File Type: mq4 ^Dyn_Pivot.mq4 (4.2 KB, 7 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

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


All times are GMT. The time now is 10:47 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.