User: editor -- 2010-10-14 << 629 631 >> |
Hits: 3371 |
Type: Text data calculation |
Search all Text data calculation examples |
Description: |
How to calculate CFMO 15 and CFMO 21 from csv file of stock data? Chaikin wrote the Acc/Dis formula. His formula: {(Close - Low) - (High - Close)} / {High - Low} * Volume His next formula: CMFO sums AD for 21 days and then divides the result by volume for the identical period. Volume is used as the divisor so that the indicator will fluctuate between a maximum of 1 and a minimum of -1. OUTPUT two columns CFMO 15 and CFMO 21 |
Input Sample: |
CODE,DATE,OPEN,HIGH,LOW,CLOSE,VOLUME MNI,08/03/09,2.39,2.84,2.31,2.60,4893300 MNI,08/04/09,2.71,2.75,2.30,2.52,1908100 MNI,08/05/09,2.52,2.56,2.09,2.27,2567600 MNI,08/06/09,2.21,2.40,2.02,2.08,1646200 |
Output Sample: |
DATE TIME OPEN HIGH LOW VOLUME CLOSE CMFO_15 CMFO_21 08/03/09 00:00 2.39 2.84 2.31 4893300 2.60 0.09 0.09 08/04/09 00:00 2.71 2.75 2.30 1908100 2.52 0.06 0.06 08/05/09 00:00 2.52 2.56 2.09 2567600 2.27 -0.02 -0.02 08/06/09 00:00 2.21 2.40 2.02 1646200 2.08 -0.12 -0.12 |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. ctrl-o open source text file 2. ctrl-h open replace dialog * set "replace scope" to "Line" * in "search for pattern", enter: * in "replace with pattern", enter: * in "Advanced Page", enter following in "Run following for each matched unit" entry: 3. click "Replace". |
Download Script: scripts/630.rst.zip |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |