I need to process a file with the following structure. 10:14:44,0.3540,-0.0290,134988,-7.57,0.3610,0.3420,0.3343,0.3830 ,0.3500,0.3710 10:16:44,0.3540,-0.0290,134988,-7.57,0.3610,0.3420,0.3343,0.3830 ,0.3500,0.3710 10:22:45,0.3540,-0.0290,134988,-7.57,0.3610,0.3420,0.3343,0.3830 ,0.3500,0.3700
Every minute, if the detailed quote changes, a new row detailed quote information is appended to the file. In this case the data is for a stock UURAF. The data is collected by using a bash script containing awk routines. I want to process the information in real time. As an example, I would like to calculate the moving average for the last 5 and last 10 trades. My first guess would be to initialize an empty array and as new data comes in insert it into the array. When the array changes, I would recalculate and display the result. My question is: How do I add data in real time (when I get new data appended to my comma file ) to a J array that I can process? thanks ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm