How Normalize() is calculated?
  #1 (permalink)  
Old 09-09-2005, 02:40 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,930
Thanks: 99
Thanked 365 Times in 149 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default How Normalize() is calculated?

Hello,

Does anybody know how Normalize() or NormalizeDouble() is calculated? I want to know the internal calculation of this function.

If you have a spare time, could you forward this question to MetaQuotes forum? They banned me last time. If possible, ask them how to rewrite the Normalize() function in C

Thanks in advance,
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #2 (permalink)  
Old 09-09-2005, 04:07 AM
Ravique's Avatar
Super Moderator
 
Join Date: Sep 2004
Posts: 404
Thanks: 2
Thanked 1 Time in 1 Post
Ravique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to all
Send a message via Yahoo to Ravique
Default

I just posted it there in the english forum , thread : How Normalize() is calculated? Waiting for an answer, which I suppose can take up till monday, since it is weekend and tech support teams have a weekend.
__________________
Regards,
Ravique
Reply With Quote
  #3 (permalink)  
Old 09-10-2005, 09:14 AM
Ravique's Avatar
Super Moderator
 
Join Date: Sep 2004
Posts: 404
Thanks: 2
Thanked 1 Time in 1 Post
Ravique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to all
Send a message via Yahoo to Ravique
Default

Scorpion, if you are banned , it means that you can`t read the forum at all ? Or you can`t just post it ?

Here is the thread I started :

http://www.metaquotes.net/forum/1034/

And here is the first reply :

Shimodax 10.09.05 12:55


Try something like:

// get a one with digit zeros behind/ 10, 100, 1000
double f= 1;
for (int i= 0; i<digits; i++) {
f*= 10;
}

// round it up
double result= (int)(roundwhat*p + 0.5);
result/= p;



Markus


----------------------------------------------------------------------------------

If u can read them, then read on, If not I ll be posting them, just tell me.
__________________
Regards,
Ravique
Reply With Quote
  #4 (permalink)  
Old 09-10-2005, 10:36 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,930
Thanks: 99
Thanked 365 Times in 149 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

Hey,

Ravique, thanks! I can read posts at MQ forum though banned. Maybe they trace my ip or something that why they don't approve my new registrations.

Shimodax's calculation is incorrect. The result of his calculation and result of the original Normalize() is different.

It's so weird with the Normalize() implemented in MetaTrader. It's supposed to be banker's rounding, but it isn't.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #5 (permalink)  
Old 09-10-2005, 11:30 AM
Ravique's Avatar
Super Moderator
 
Join Date: Sep 2004
Posts: 404
Thanks: 2
Thanked 1 Time in 1 Post
Ravique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to all
Send a message via Yahoo to Ravique
Default

Well Let`s just wait for the MT administrators to answer
__________________
Regards,
Ravique
Reply With Quote
  #6 (permalink)  
Old 09-10-2005, 04:23 PM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,930
Thanks: 99
Thanked 365 Times in 149 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

Hey, borrowing hands is fun! I've just registered a new name; hope the fasis

Quote:
Originally Posted by Shimodax
I just hacked it up here in the message window (just saw that "p" shoudl be "f"). But I think it will be something like that.

However, I just tried this and it gave the same result as NormalizeDouble(d, 4); => Result 1.2346
I'd like to tell him that his algoritm always round up while NormalizeDouble() sometimes round down and up. I've compared a wide range of values and found that his and MetaTrader's vary about 70%.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #7 (permalink)  
Old 09-12-2005, 11:01 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,930
Thanks: 99
Thanked 365 Times in 149 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

Ravique, they just allowed to me to post now. Thanks for lending me a hand
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #8 (permalink)  
Old 09-16-2005, 04:29 PM
Freshman
 
Join Date: Sep 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Fantasia is on a distinguished road
Default

..........
Reply With Quote
Reply


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

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



All times are GMT. The time now is 05:04 AM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0

Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now