Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

599.Text data calculation -- How to generate 12 columns EMA with different periods based on "close" value?

User: editor -- 2010-08-27          << 598  600 >>
Hits: 373
Type: Text data calculation   
Search all Text data calculation examples
Description:
How to generate 12 columns EMA with different periods based on close value of stock?

TRADERS
0= EMA( Close, 3 );
1= EMA( Close, 5 );
2= EMA( Close, 7 );
3= EMA( Close, 9 );
4= EMA( Close, 11 );
5= EMA( Close, 13 );

INVESTORS
6= EMA( Close, 30 );
7= EMA( Close, 34 );
8= EMA( Close, 38 );
9= EMA( Close, 42 );
10= EMA( Close, 46 );
11 = EMA( Close, 50 );

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 EMA(3,5,7,9,11,13,30,34,38,42,46,50)
12/16/09 00:00 6.18 6.18 5.99 16330 6.05 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
12/17/09 00:00 6.03 6.08 6.00 74300 6.06 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
12/18/09 00:00 5.66 5.74 5.14 1677700 5.51 5.78 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
12/21/09 00:00 5.51 5.60 5.45 388200 5.47 5.58 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
12/22/09...
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'
* in 'search for pattern', enter:

* in 'replace with pattern', enter:

* click 'advanced' page, in 'run following for each matched unit', enter:

3. click 'Replace', done!
Download Script:  scripts/599.rst.zip

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to generate EMA of close of different periods and related STD from stock data? (65%)
How to calculate the summaries of different EMA based on close values in stock? (64%)
How to generate EMA columns and related STD of close value from stock data? (63%)
How to generate a TREND column of Hodrick-Prescott Filter base on CLOSE value? (57%)
How to generate 2 columns of HEX numbers which increased in different loop? (56%)
How to generate a list of batch commands with different increasing id? (55%)
How to extract column X from csv file where X is decided by column A? (54%)
How to create many different html files base on a given template?  (53%)

Check Demo of Text data calculation
Keywords:
period  stock  toc  calculation  columns  2 columns  calcu  scope  replace scope  join  different columns  1 13  replace different  text join  replace with data  data replace  replace text pattern  search pattern