| New signals service! | |
|
|||||||
| 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 | Display Modes |
|
|||
|
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 ??? |
|
|||
|
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
Quote:
do you want to use that normalisation in pattern recognition system or Neural Network Data feed ? =================== Forex Indicators Collection |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Function that returns an Array? | charliev | Metatrader 4 | 14 | Yesterday 10:53 PM |
| RSI data to CSV | arjang | General Discussion | 5 | 07-22-2008 09:59 PM |
| Great indicator - partly converted from MQ3 | leeb | Indicators - Metatrader 4 | 11 | 01-24-2007 06:48 PM |
| Array search helper functions for your use... | cubesteak | Metatrader 4 | 3 | 09-04-2006 04:55 AM |