User: editor -- 2010-06-12 << 532 534 >> |
Hits: 3390 |
Type: Text data calculation |
Search all Text data calculation examples |
Description: |
How to calculate Acc/Dis, OBV and related MA values of stock data? Formula of Acc/Dis: Acc/Dist = ((Close ¨C Low) ¨C (High ¨C Close)) / (High ¨C Low) * Period's volume Formula of OBV: If today's price close > yesterday's price close then OBV = yesterday's OBV + today's volume. If today's price close < yesterday's price close then OBV = yesterday's OBV - today's volume. If today's price close = yesterday's price close then OBV = yesterday's OBV |
Input Sample: |
CODE,DATE,OPEN,HIGH,LOW,CLOSE,VOLUME MNI,08/03/09,2.39,2.84,2.31,2.60,4893300 MNI,08/04/09,2.71,2.75,2.30,2.52,1908100 MNI,08/05/09,2.52,2.56,2.09,2.27,2567600 MNI,08/06/09,2.21,2.40,2.02,2.08,1646200 |
Output Sample: |
DATE TIME OPEN HIGH LOW VOLUME CLOSE Acc/Dist MA(24)_Acc_Dist OBV MA(12)_OBV 08/03/09 00:00 2.39 2.84 2.31 4893300 2.60 461632.08 461632.08 0 0.00 08/04/09 00:00 2.71 2.75 2.30 1908100 2.52 -42402.22 209614.93 -1908100 -954050.00 08/05/09 00:00 2.52 2.56 2.09 2567600 2.27 -600927.66 -60565.93 -4475700 -2127933.33 08/06/09 00:00 2.21 2.40 2.02 1646200 2.08 -1126347.37 -327011.29 -6121900 -3126425.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 dialog * set "replace scope" to "Line" * in "search for pattern" enter: * in "replace with pattern" enter: * in "Advanced Page", enter following in "Run following for each matched unit" entry: 3. click "Replace", done! |
Download Script: scripts/533.rst.zip |
Similar Examples: |
How to generate Acc/Dist, OBV, MFI and related MA from stock data? (78%) How to calculate Acc/Dis and corresponding 24 days' MA base on stock data? (72%) How to calculate OBV(On Balance Volume) base on stock data? (70%) How to generate EMA columns and related STD of close value from stock data? (65%) How to calculate Elder's Force Index (EFI) and related MA, EMA for stock data? (65%) How to calculate SUM of EMAs and Covariance of close value from stock data? (61%) How to calculate the summaries of different EMA based on close values in stock? (61%) How to calculate Williams %R from stock data? (61%) |
Check Demo of Text data calculation |
Keywords: |
obv price periods period toc stock day calculate else calculation search calculate replace search replace calculate calculate text data if else if then search data replace with data data replace |