Forex



Go Back   Forex Trading > Discussion Areas > Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 01-21-2007, 05:53 AM
Member
 
Join Date: Feb 2006
Posts: 63
icm63 is on a distinguished road
Data in Array converted to btw 0 and 1 ( normalisation) !

hi,

I have EURUSD close only data in an array. like Data[]

But the numbers are all EURUSD closes for all the records.

How can I convert or normalise all data in the array to between a minimum of 0 and maxium of 1.

Then I can draw data in Indictor box. And other reasons ???

I know I need Max number in Data[] and Min number in Data[] and then spread data based on a ratio back into array ??

Any ideas ???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 01-21-2007, 08:04 AM
ralph.ronnquist's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 297
ralph.ronnquist is on a distinguished road
data[ i ] = ( data[ i ] - min ) / ( max - min )
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 01-21-2007, 09:12 AM
Member
 
Join Date: Feb 2006
Posts: 63
icm63 is on a distinguished road
Thanks just cracked it at 10.12 pm NZD time

// Normalise data between 0 and 100
void Normalise(double& InData[])
{
double max, min, range;
int count = ArraySize(InData);
int k, m;
double Temp[];
k = ArrayMaximum(InData,512,0);
max = InData[k];
m = ArrayMinimum(InData,512,0);
min = InData[m];
range = max - min;
ArrayResize(Temp, count);

for(int i=0; i<count; i++)
{
Temp[i] = NormalizeDouble((((InData[i] - min) / range)*100),2) ;
}
ArrayCopy(InData, Temp);
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 01-21-2007, 10:53 AM
Senior Member
 
Join Date: Jun 2006
Posts: 1,513
prasxz is on a distinguished road
hi

Quote:
Originally Posted by icm63
Thanks just cracked it at 10.12 pm NZD time

// Normalise data between 0 and 100
void Normalise(double& InData[])
{
double max, min, range;
int count = ArraySize(InData);
int k, m;
double Temp[];
k = ArrayMaximum(InData,512,0);
max = InData[k];
m = ArrayMinimum(InData,512,0);
min = InData[m];
range = max - min;
ArrayResize(Temp, count);

for(int i=0; i<count; i++)
{
Temp[i] = NormalizeDouble((((InData[i] - min) / range)*100),2) ;
}
ArrayCopy(InData, Temp);
}
Hi,

do you want to use that normalisation in pattern recognition system or Neural Network Data feed ?

===================
Forex Indicators Collection
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 01-22-2007, 02:25 AM
Member
 
Join Date: Feb 2006
Posts: 63
icm63 is on a distinguished road
Nope, I need to normalise data for correlation calculations.

Thx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
RSI data to CSV arjang General Discussion 7 05-11-2009 06:16 AM
Function that returns an Array? charliev Metatrader 4 23 11-19-2008 04:16 AM
Great indicator - partly converted from MQ3 leeb Indicators - Metatrader 4 11 01-24-2007 07:48 PM
Array search helper functions for your use... cubesteak Metatrader 4 3 09-04-2006 05:55 AM


All times are GMT. The time now is 05:53 AM.



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