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.

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 :

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.


Wednesday, September 12, 2007

Blog and RSS Directories

Blog and RSS Directories

Search4RSS
DeskFeeds
Terrar
The Feed Spot
StepNewz
RSS Verzeichnis
4Guys from Rolla
DevASP
FuzzySoftware
ASP Index
SourceForge
Feed Directory
FeedBeagle
FeedPlex
Feeds4All
NewsFeedFinder
Plazoo
Newzfire
Feed24
Shas3
RSS Feeds Directory
FeedCat
FeedMiner
RSS
Clipping

Read A
Feed

Loomia
Feeds2Read
Feedzie
RSS
Portal

RSS Feed 4U
StepNewz
StepNewz
Thomas Korte
JordoMedia
RSS Mad
FeedBomb
nFeeds
Auto Feeds
News
Goblin

Wordum
FeedSee
Ez2News
Submit Feeds
Feedooyoo
Science
Port

FeedAge
GoldenFeed
RSSMicro
FeedDirectory
Octora RSS Feeds
RSS Locator
Syndic8
DayPop
Feedster
Rocket News
Technorati
Userland
Postami
Finance
Investing Feeds

Security Protection Feeds
Realty
Feeds

Medical
Feeds

Religious Podcasts
Sports Feeds
Political Feeds
Government Feeds
Educational Feeds
2RSS
NewsMob
RocketInfo
Edu RSS
Sourceforge.net
Complete RSS
Feeds.com.br
MoreOver
GeneCast
Memigo
PubSub
BulkFeeds
Yenra
easyRSS
NewsXS
FeedFarm
FastBuzz
RSSFeeds
FeedFury
National Lib for Health
RSSMotron
FindRSS
FeedBase
RSSMotron
MoreNews.be
Day Time News
FeedGod
RSSBuffet
RSS
Feeds-Belgium

RSS Nachrichten-Germany
RSS Feeds-Israel
Spanish Feeds
Japanese
Feeds

SubmitEmNow
Blog
Digger

ReadABlog
Blogarama
BlogStreet
Globe of
Blogs

Kmax
Blog Links

BlogDex
BlogSearchEngine
BlogHop
BlogWise
EatonWeb
PopDex
Blizg
Blo.gs
BlogCensus
BlogTree
BlogStreet
BritBlog
BlogLines
Bloogz
Australian Blog Directory
BoingBoing
RootBlog
Weblog Directory
BlogoSphere EcoSystems
Blogz
BlogWatcher
BlogMatcher
BlogPulse
BlogCatalog
Blogdir Blogsrus
Blogs By City
FeedMap
BlogSearch
PubSub
BlogSweet
BlogFlux
Blogtastic
Blog Introduction
Finding
Blog

Bulletize
BlogTopSites
Blog Fuse
Blogion
AddUrlBlog
Blogbib
BOTW Blog
Blog Directory Submit
BlogTopSites
BlogBusiness
BlogSiteZone
Blog Universe
BlogTopList
BlogBurst

Major Search Engine Directories

DMOZ
Google
Yahoo
AltaVista
AOL
Euroseek
Kanoodle
Teoma
Lycos
What-U-Seek
Moteurderecherche
Exactseek
Excite
Alexa
AllTheWeb
Inktomi
SearchIt
National Directory

PageRank shows "?" symbol instead of the correct value

Check this out. Try putting the code in my post html.


Checking Page Ranking


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:

Checking Page Ranking


<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.

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.


ttanalysis.com

The 10-Day SMA is the average price of a 10 days' close prices.


ttanalysis.com

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.


ttanalysis.com

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.


ttanalysis.com

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;amp;t=5y&l=on&z=l&q=c&p=m50,m200&a=&c=



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 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:324)
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.

Update SMS_SymbolTrade SET SoldShare = 0 WHERE SoldShare IS NULL;

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.

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...