Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

372.Advanced search and replace -- How to batch reorganize stock data from CSV to TXT and add MACD and EMA?

User: editor -- 2009-12-22          << 371  373 >>
Hits: 3217
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to batch reorganize stock data from CSV to TXT and add MACD and EMA 
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 
 
12/16/09 00:00 6.18 6.18 5.99 16330 6.05 -0.00 0.00 
12/17/09 00:00 6.03 6.08 6.00 74300 6.06 0.00 0.00 
12/18/09 00:00 5.66 5.74 5.14 1677700 5.51 -0.04 -0.01 
12/21/09 00:00 5.51 5.60 5.45 388200 5.47 -0.08 -0.02 
12/22/09 00:00 5.48 5.72 5.48 336178 5.72 -0.10 -0.04
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' window 
set "Replace Unit" to "Chars" 
set "Replace Scope" to "Line" 
set "Search for Pattern" to: 
 
set "Replace with Pattern" to: 
 
click "Advanced" page,  
set "Run following for each matched unit" to: 
 
3. Click 'Replace' button, you will get 2 additional column with MACD(12,26) and MACD EMA(9). 
4. ctrl-s save to file. 
 
Note: you can also click "Batch..." button in step 3, if you need process multiple files.
Download Script:  scripts/372.rst.zip

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to batch reorganize following stock datas from CSV to TXT? (75%)
How to re-organize excel data with complicate date format? (48%)
How to batch change a lot of xml files, adding all <ID> by 1? (47%)
How to batch replace the last 5 "old" with "new" in a text file? (46%)
How to batch rename picture files to the data and time of the pictures? (46%)
How to batch remove/delete lines started by "address:"? (45%)
How to batch check all the links of a website and save to a file? (45%)
How to batch replace files and save the result to new files? (43%)

Check Demo of Advanced search and replace
Keywords:
macd  macd ema  addition  toc  stock  process  else  csv  replace scope  scope  add replace data in multiple files  replace with multiple data  if else  2 else  search and replace batch open source  batch text column  batch text to column  open source batch replace