Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

630.Text data calculation -- How to calculate CFMO 15 and CFMO 21 from csv file of stock data?

User: editor -- 2010-10-14          << 629  631 >>
Hits: 1934
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


Similar Examples:
How to calculate SUM of EMAs and Covariance of close value from stock data? (67%)
How to calculate Williams %R from stock data? (62%)
How to calculate OBV(On Balance Volume) base on stock data? (61%)
How to calculate Parabolic SAR on a 5 days basis of stock data? (60%)
How to calculate Acc/Dis, OBV and related MA values of stock data? (58%)
How to calculate the summaries of different EMA based on close values in stock? (55%)
How to generate EMA columns and related STD of close value from stock data? (54%)
How to calculate Acc/Dis and corresponding 24 days' MA base on stock data? (54%)

Check Demo of Text data calculation
Keywords:
identical  minimum  divide  iso  div  maximum  period  toc  stock  day  calculate the minimum of a text file  calculate 15  calculate maximum in text file  csv data calculate  maximum minimum  search period  csv text to columns  search next