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.
Friday, September 14, 2007
How do we trade with the RSI-14 strategy?
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
PageRank shows "?" symbol instead of the correct value
Check this out. Try putting the code in my post html.
Here is the code:
<a href="http://www.prchecker.info/" target="_blank">
<img src="http://www.prchecker.info/ttanalysis.blogspot.com-pagerank-3.gif" alt="Checking Page Ranking" border="0" /></a>
Try another one:
<a href="http://www.prchecker.info/" target="_blank">
<img src="http://www.prchecker.info/ttanalysis.blogspot.com-pagerank-2.gif" alt="Checking Page Ranking" border="0" /></a>
Hmm... None of them works..... Kind of sucks.
Posted by techgeek168 at 9:52 AM 0 comments
Tuesday, September 11, 2007
What is MA5-10 Moving Average?
MA5-10 Moving Average
Moving Average is the most easy and popular trading strategy to the technical traders. It can be used to confirm trend, identify resistance or support levels, and help developing new trading systems.
As of today, we track and calculate the stock performance of a short-term 5-day to long-term 10-day Simple Moving Average strategy, which is called MA5-10 strategy in our system.
How to calculate 5-Day SMA and 10-Day SMA?
The 5-Day SMA is the average price of a 5 days' close prices.
The 10-Day SMA is the average price of a 10 days' close prices.
How do we trade with the MA5-10 strategy?
The MA5-10 is a trading strategy utilizing the Simple Moving Average (SMA) indicator. A short-term moving average is defined as a 5-day SMA. A long-term simple moving average is defined as a 10-day SMA. The system generates a BUY signal when the short-term 5-day SMA line moves above the long-term 10-day SMA line. And, it generates a SELL signal when the short-team 5-day SMA line goes under the long-term 10-day SMA line.
If there is a BUY/SELL signal generated today, a Market Buy/SELL Order will be created and it will be executed on tomorrow's open price.
Below is an example of a SELL signal generated by the system because the 5-Day SMA 41.31 is moving below 10-Day SMA 41.42 on 11/28/2000. And the stock will be sold at 40.02 on 11/29/2000 at it's opening price the next trading day.
Here is an example of a BUY signal generated by the system. As you can see the 5-Day SMA 42.45 is rising above the 10-Day SMA 41.88 on 12/05/2000. And the stock will be bought at 47.88 on 12/06/00 at it's opening price the next trading day.
How does it work with individual stocks?
You may see some of the stock with a profit over 100% in a 5-year period of trading by following MA5-10 strategy. But, unfortunately, it also proves that you may lose tons of money by just simply following the trading signals it generated by the system. Personally, I don't believe there is "the one" strategy we can use to make a profit on every stocks on the market.
Why not using 50-200 days to trade?
That is because you can easily get the picture on how it does from Yahoo.
I.e. http://finance.yahoo.com/q/ta?s=WFC&amp;amp;amp;amp;t=5y&l=on&z=l&q=c&p=m50,m200&a=&c=Posted by techgeek168 at 1:57 PM 0 comments
Labels: Strategy
Java NullPointerException from a NULL field in MySQL database
Problem
A java.lang.NullPointerException error occurs when the Entity Bean trying to retrieve rows from MySQL database.2007-09-11 09:05:20,025 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.SMS_SymbolTrade]
Executing SQL: SELECT tradeid, symbolid, boughtdate, boughtshare, boughtprice,
solddate, soldshare, soldprice FROM sms_symboltrade WHERE (tradeid=?) OR (tradeid=?)
OR (tradeid=?) OR (tradeid)
2007-09-11 09:05:20,035 ERROR
[org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in
method: public abstract smsj.ejb.interfaces.SMS_SymbolTradeValue
smsj.ejb.interfaces.SMS_SymbolTradeLocal.getSMS_SymbolTradeValue(),
causedBy:java.lang.NullPointerException
at smsj.ejb.bean.SMS_SymbolTradeCMP$Proxy.getSoldshare(<generated>)
at smsj.ejb.bean.SMS_SymbolTradeCMP.getSMS_SymbolTradeValue(SMS_SymbolTradeCMP.java:76)
at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
at $Proxy220.selectTradeBySymbolIdBoughtDate(Unknown Source)
at smsj.server.SMSSocketProtocol.generateXML(SMSSocketProtocol.java:423)
Environment
MySQL Table: SMS_SymbolTrade+-------------+-------------+------+-----+---------+-------+
| Field |Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| TradeId | varchar(64) | NO | PRI | | |
| SoldDate | date | YES | | NULL | |
| SoldShare | int(7) | YES | | 0| |
| SoldPrice | float(7,2) | YES | | 0.00| |
+-------------+-------------+------+-----+---------+-------+
Data Sample:
+--------------------+----------+-----------+-----------+
| TradeId | SoldDate | SoldShare | SoldPrice |
+--------------------+----------+-----------+-----------+
| 101189456691548214 | NULL | NULL | NULL |
| 101189456691550974 | NULL | NULL | NULL |
| 101189456691559293 | NULL |0 | NULL |
| 101189456691563329 | NULL |0 | NULL |
+--------------------+----------+-----------+-----------+
Entity Bean: SMS_SymbolTradeBean.java
public abstract class SMS_SymbolTradeBean{
private String tradeid; //pk
private String solddate;
private int soldshare;
private Float soldprice;
. . . . . . . .
Solution
The root cause of the NullPointerException is from the NULL value of the SoldShare field in SMS_SymbolTrade table. The data type of the SoldShare field is set to int(7), which means the SoldShare field is a primitive, not an Object. Although you can set a NULL value to the SoldShare field in MySQL database, when the Entity bean trying to read it from database, because it’s a primitive field that can’t be set to NULL in EJB, it throws the famous NullPointerException to the log.
Just simply updated all NULL value to 0 and it fixed myproblem.Posted by techgeek168 at 10:08 AM 0 comments
Labels: Database
Wednesday, September 5, 2007
How to add Page Rank Checker
I found a free Page Rank Checker that will show your blog's Page Rank. But, do I really care about the Page Rank? Anyway, here is the code to put on your blog:
<a href="http://www.prchecker.info/" target="_blank">
<img src="http://www.prchecker.info/PR2_img.gif" alt="Free Page Rank Checker" border="0" /></a>
You can go to http://www.prchecker.info/ for detail.
Posted by techgeek168 at 2:03 PM 0 comments
Labels: HowToBlog
How to add sub menu to your blog?
You'll have to create a new post first.
For instance, “How to create a sub menu to your blog?”. And copy your new post URL, http://ttanalysis.blogspot.com/2007/09/how-to-add-sub-menu-to-your-blog.html
1. Click on the “Customize” menu item and then click on the “Add a Page element” link on the “Add and Arrange Page Elements” page.
2. Select the “Link List” by clicking on the “ADD TO BLOG” button.
3. Enter your menu title in the Title text box. “Newly Added” for this example. Copy and paste your URL to “New Site URL” text box and give it a name as “How to add sub menu to your blog?” in the New Site Name text box. And click on the SAVE CHANGES button.
4. Verify it on your blog and you are done.
Note: the image file is a little bit hard to put in with this editor. I wonder how to make it easier...
Posted by techgeek168 at 12:59 PM 0 comments
Labels: HowToBlog