Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

528.Advanced search and replace -- How to calculate Acc/Dis and corresponding 24 days' MA base on stock data?

User: editor -- 2010-06-07
Hits: 82
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to calculate Acc/Dis and corresponding 24 days' MA base on stock data?

Formula of Acc/Dis:

Acc/Dist = ((Close ¨C Low) ¨C (High ¨C Close)) / (High ¨C Low) *
Period's volume
Input Sample:
CODE,DATE,OPEN,HIGH,LOW,CLOSE,VOLUME
AIQ,12/16/09,6.18,6.18,5.99,6.05,16330
AIQ,12/17/09,6.03,6.08,6.00,6.06,74300
AIQ,12/18/09,5.66,5.74,5.14,5.51,1677700
AIQ,12/21/09,5.51,5.60,5.45,5.47,388200
AIQ,12/22/09,5.48,5.72,5.48,5.72,336178
Output Sample:
DATE TIME OPEN HIGH LOW VOLUME CLOSE Acc/Dist MA(24)_Acc_Dist
12/16/09 00:00 6.18 6.18 5.99 16330 6.05 -6016.32 -6016.32
12/17/09 00:00 6.03 6.08 6.00 74300 6.06 37150.00 15566.84
12/18/09 00:00 5.66 5.74 5.14 1677700 5.51 391463.33 140865.67
12/21/09 00:00 5.51 5.60 5.45 388200 5.47 -284680.00 34479.25
12/22/09 00:00 5.48 5.72 5.48 336178 5.72 336178.00 94819.00
Answer:
Hint: You need to Download and install "Replace Pioneer" to finish following steps.
1. ctrl-o open source text file
2. ctrl-h open 'Replace' dialog
* set 'replace scope' to 'Line'
* set 'search for pattern' entry to:

* set 'replace with pattern' to:


click 'advanced' page, enter following in "Run following for each matched unit" entry:

3. click 'Replace', done!
4. ctrl-s save to file
Download Script:  scripts/528.rst.zip

Similar Examples:
How to calculate Acc/Dis, OBV and related MA values of stock data? (72%)
How to calculate OBV(On Balance Volume) base on stock data? (60%)
How to generate Acc/Dist, OBV, MFI and related MA from stock data? (58%)
How to calculate SUM of EMAs and Covariance of close value from stock data? (57%)
How to calculate Williams %R from stock data? (56%)
How to calculate Elder's Force Index (EFI) and related MA, EMA for stock data? (55%)
How to calculate the summaries of different EMA based on close values in stock? (54%)
How to change the number to the corresponding letter base on mapping table? (53%)

Check Demo of Advanced search and replace