data[ i ] = ( data[ i ] - min ) / ( max - min )
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 = NormalizeDouble((((InData - min) / range)*100),2) ;
}
ArrayCopy(InData, Temp);
}
hi
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 = NormalizeDouble((((InData - min) / range)*100),2) ;
}
ArrayCopy(InData, Temp);
}Hi,
do you want to use that normalisation in pattern recognition system or Neural Network Data feed ?
===================
Nope, I need to normalise data for correlation calculations.
Thx
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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 ???