User: editor -- 2010-11-17 << 656 658 >> |
Hits: 5042 |
Type: Text data calculation |
Search all Text data calculation examples |
Description: |
How to calculate Parabolic SAR on a 5 days basis of stock data? all weeks except the first week must have 5 days, where the date is the first date of the week series. the OHLVC is calculated as: O = First Open, H = Highest High, L = Lowest Low, C = Last Close, and V = EMA average. |
Input Sample: |
CODE,DATE,OPEN,HIGH,LOW,CLOSE,VOLUME AIQ,03/02/09,2.91,2.98,2.54,2.54,2845000 AIQ,03/03/09,2.60,2.64,2.44,2.46,3036900 AIQ,03/04/09,2.51,2.84,2.47,2.78,7518800 AIQ,03/05/09,2.71,2.71,2.50,2.56,2468700 AIQ,03/06/09,2.58,2.91,2.56,2.89,2962900 AIQ,03/09/09,2.63,3.59,2.52,3.03,3380300 AIQ,03/10/09,3.19,3.59,3.05,3.58,7604400 AIQ,03/11/09,3.48,3.60,3.41,3.55,2349100 |
Output Sample: |
DATE_GROUP TIME FIRST_OPEN HIGHEST_HIGH LOWEST_LOW EMA_VOLUME LAST_CLOSE SAR 03/04/09 00:00 2.91 2.98 2.44 5245866 2.78 2.98 03/11/09 00:00 2.71 3.60 2.50 4046566 3.55 2.44 |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. ctrl-o open source text/csv stock file 2. ctrl-h open 'replace' window * set 'replace with pattern' to: * click 'advanced' tab, set 'run following for each matched unit' to: 3. click 'replace', done! 4. ctrl-s save to file |
Download Script: scripts/657.rst.zip |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |