Remove first 3 lines in a file:
$cat bearish.htm | awk 'NR>3'
Rounding Number:
Need to be able to round numbers in bash to the nearest whole number? You can use a single line of code in AWK to do the job. For example, the following code will make the number 29.498398 round up to 29.50:
$ echo 29.498398 | awk '{ rounded = sprintf("%.2f", $1); print rounded }'
29.50
Tuesday, October 2, 2007
Unix Command Samples - awk
Posted by
techgeek168
at
4:16 PM
0
comments
Labels: CygwinAwkCronSed
Unix Command Samples - Sed
Display file without the blank lines and remove the first line:
$ cat bearish.htm | sed -e '/^ *$/d;1,1d'
Remove first 3 lines in a file:
$cat bearish.htm | sed -e '1,3d'
Remove HTML tags:
$cat bearish.htm | sed -e 's/<[^>]*>//g'
Posted by
techgeek168
at
4:01 PM
0
comments
Labels: CygwinAwkCronSed
Friday, September 14, 2007
How do we trade with the RSI-14 strategy?
The RSI-14 is a 14-period RSI trading strategy, which can be calculated into a number that ranges from 0 to 100.
When the number of RSI-14 rises above 30 it is considered a bullish sign for the stock, therefore, our system will create a BUY signal the stock.
When the number of RSI-14 falls under 70, it is considered a bearish sign for the stock, and our system will create a SELL signal for the stock.
Posted by
techgeek168
at
8:50 PM
1 comments
Labels: RSI-14
How to calculate RSI-14?
RSI-14 = 100 – 100 / (1 + RS14) :
RS14 = Avg.Up14 / Avg.Dn14 :
Avg.Up14 = Average( ChangeUp for 14 days ) :
Avg.Dn14 = Average( ChangeDn for 14 days ) :
ChangeUp = IF ( Change > 0, Change, 0 ) :
ChangeDn = IF ( Change <=0, ABS(Change), 0) :
Change = Today Close – Yesterday Close :
Posted by
techgeek168
at
8:41 PM
0
comments
Labels: RSI-14
RSI-14 Relative Strength Index
A technical momentum oscillator that compares the magnitude of recent gains to recent losses in an attempt to determine overbought and oversold conditions of a stock.
As of today, we track and calculate the stock performance of a period of 14 days RSI, which is called RSI-14 strategy in our system.
Posted by
techgeek168
at
8:37 PM
0
comments
Labels: RSI-14
Wednesday, September 12, 2007
Blog and RSS Directories
Blog and RSS Directories
Posted by
techgeek168
at
10:20 AM
0
comments
Labels: HowToBlog