Forex
Google

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions
Forex Forum FAQ Members List Calendar Mark Forums Read


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
 
Old 01-04-2006, 01:37 AM
rayie rayie is offline
Junior Member
 
Join Date: Oct 2005
Posts: 6
rayie is on a distinguished road
How to get 4 digit after dot

hi all and codeguru

sory for my bad english and i'm newbie in programming...

i get value from double() function like 1.75673456
and i want get only four digit after dot like 1.7567

how to get that ???

thanks for the answer
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 01-04-2006, 02:24 AM
akiruis akiruis is offline
Junior Member
 
Join Date: Dec 2005
Posts: 9
akiruis is on a distinguished road
Hi Rayie

You can use NormalizeDouble function.

double NormalizeDouble( double value, int digits)

Rounds floating point number to specified decimal places.

Parameters

value - Floating point value.
digits - Precision format, number of digits after decimal point (0-8).



Aki
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 01-04-2006, 02:51 AM
rayie rayie is offline
Junior Member
 
Join Date: Oct 2005
Posts: 6
rayie is on a distinguished road
thanks aki...

but i don't how to use it, can you give me an example ??

my code : double ValueNormalize = Buffer[i]

Buffer's value 8 digit and i want ValueNormalize 4 digit.

tx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 01-04-2006, 03:16 AM
rayie rayie is offline
Junior Member
 
Join Date: Oct 2005
Posts: 6
rayie is on a distinguished road
Wink

i got it

thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 

Thread Tools

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

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



All times are GMT. The time now is 07:37 PM.