Previous problem fixed, The "DO" is not in the FOR example in the help file.
Next problem, There is a problem with the output buffer not being flushed properly:
input="stocks.lst"; output="output.csv"; Integer I; Float F1; Float F2; DaysToLoad(1200); For I = -1000 to -20 step 1 do F1 := (close(i) - EMovAvg(I,10,cl)) / EMovAvg(I,10,cl); F2 := (close(i+20) - EMovAvg(I+20,10,cl)) / EMovAvg(I+20,10,cl); println I,",",date(I),",",F1,",",F2; next I;
Assume the stocks.csv file contains one stock, say MSFT. The output file will be truncated early and not all the records will be there. If you change the "-1000" to "-800" you get all the data. |