Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

608.Advanced search and replace -- How to generate EMA of close of different periods and related STD from stock data?

User: editor -- 2010-09-09          << 607  609 >>
Hits: 3366
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to generate EMA of close of different periods and related STD from stock data? 
 
Formula of STD: 
pr:= Close;  
m1:= Mov(pr,3,E);... m12:= Mov(pr,60,E);  
 
mvst:= (m1+m2+m3+m4+m5+m6)/6;  
mvlt:= (m7+m8+m9+m10+m11+m12)/6;  
MV:= (mvst+mvlt)/2;  
STD:= Sqrt(  
( Power(m1-mv,2)+Power(m2-mv,2)+...+Power(m12-mv,2) )/12 );  
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,8,10,12,15,30,35,40,45,50,60) STD 
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 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 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 1.60 
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 ... 
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 scope' to 'Line' 
* set 'search for pattern' to: 
 
* set 'replace with pattern' to: 
 
* click 'advanced' page, in 'run following for each matched unit' fill: 
 
 
3. click 'Replace', done. 
4. ctrl-s save to file.
Download Script:  scripts/608.rst.zip

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to generate EMA columns and related STD of close value from stock data? (71%)
How to generate 12 columns EMA with different periods based on "close" value? (64%)
How to generate several different versions of shuffled paragraphs? (59%)
How to generate Acc/Dist, OBV, MFI and related MA from stock data? (58%)
How to generate a list of batch commands with different increasing id? (55%)
How to generate a csv file from a template file and a list of words? (53%)
How to calculate Elder's Force Index (EFI) and related MA, EMA for stock data? (53%)
How to batch rename files in different folders and move them to a common folder? (53%)

Check Demo of Advanced search and replace
Keywords:
101  power  periods  period  toc  stock  map  replace scope  scope  different  generate from  replace with different file  replace with different  search data  replace different  replace with data  different file  generate file