| User: editor -- 2010-02-13 |
| Hits: 110 |
| Type: Advanced search and replace |
| Search all Advanced search and replace examples |
| Description: |
| How to add MACD,EMA,FAST%K,SLOW%D and Bollinger Band columns for stock data? Formulas: #DI=(High + Low +2 * close)/4; #MACD(12,26)= EMA(12)-EMA(26) of DI #EMA(9)_MACD=EMA(9) of MACD(12,26) #dRSV(p1) = 100 * [(today's Close - Lowest Close) / (Highest Close in p1 periods - Lowest Close in p1 periods)] #FAST_K(10,5) = EMA(5) of dRSV(10) #SLOW_D(5)=EMA(5) of FAST_K(10,5) #MB=SMA(20) #K=SD(20)=sqrt( (the sum of (Close-MB)*(Close-MB)) / 20) #UB = MB + 1.8 * K #LB = MB + 1.8 * K |
| 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 MACD(12,26) EMA(9)_MACD FASK_K(10,5) SLOW_D(5) MB UB LB 12/16/09 00:00 6.18 6.18 5.99 16330 6.05 -0.00 -0.00 50.00 50.00 6.05 6.05 6.05 12/17/09 00:00 6.03 6.08 6.00 74300 6.06 -0.00 -0.00 66.67 55.56 6.05 6.05 6.05 12/18/09 00:00 5.66 5.74 5.14 1677700 5.51 -0.05 -0.01 46.67 53.33 6.02 6.05 6.00 12/21/09 00:00 5.51 5.60 5.45 388200 5.47 -0.09 -0.03 30.00 45.78 5.99 6.04 5.95 12/22/09 00:00 5.48 5.72 5.48 336178 5.72 -0.11 -0.05 30.79 39.82 5.98 ... |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" to finish following steps. |
| 1. ctrl-o open source csv file 2. ctrl-h open replace dialog set 'Replace with pattern' to: select 'advanced' page, set 'run following for each matched unit' to: 3. click 'Replace', done. 4. ctrl-s save to file. |
| Download Script: scripts/421.rst.zip |
Similar Examples: |
| How to add MACD, EMA, FAST%K, SLOW%D columns for CSV file of stock data? (88%) How to add a column of Close Location Value("CLV") on stock data? (49%) How to calculate OBV(On Balance Volume) base on stock data? (49%) How to calculate Acc/Dis, OBV and related MA values of stock data? (43%) How to produce two new columns: MACD(12,26) and MACD EMA(9) on stock data? (43%) How to calculate Elder's Force Index (EFI) and related MA, EMA for stock data? (42%) How to generate Money Flow Index (MFI) and Moving Average from stock data? (41%) How to calculate Acc/Dis and corresponding 24 days' MA base on stock data? (38%) |
Check Demo of Advanced search and replace |