Sunday, November 2, 2008

Joel Spolsky talk at Railsconf

Wednesday, October 29, 2008

Jason Fried 37 Signals Talk

Monday, October 20, 2008

Cocoa Forex

Still been cracking away at the Objective-C equivalents of the Ruby code for Gain Capital's API. I am writing it as an actual app vs. individual Objective-C snippets. When it is a bit further along I will post the code & XCode project file as a zip for others to use.


Stay tuned.

Friday, October 17, 2008

Forex Code

Soon I shall be developing and posting Objective-C code versions of the previous Ruby postings. Stay tuned...

Friday, October 10, 2008

Forex Article

Usually most beginner traders after failing to make a profit in Forex start looking for a perfect system that could make them successful. They ask successful traders what FX trading system they use. In my opinion the system is not the most important thing to your success as a trader. The most important thing is your discipline and mindset.

Yet there are some things that need to be looked in a trading system to figure out if it is profitable or not. The most important thing is what the traders call "the edge" or mathematical expectation of a trading system. The system can have a positive edge or negative edge. If it is positive you will build up you account over long period of time if you keep executing your trades. If it is negative you will drain you account no matter how big profit you are making in a single trade.

How do you find out if your system has a positive expectation or negative? The only way to figure it out is to test it. Go all the way back in time on your charts and test it on the historical data. After that forward test trade it on a demo account. Execute at least 100 trades.

Let's say in your trading system you are taking profit at 30 pips and cut your loses at 15 pips. After testing you find out that 40 trades out of 100 hit the take profit level and the rest 60 stopped out in loss. Mathematical expectation for this system is 30*40/100-15*60/100=3 pips. In other words average profit of each trade is 3 pips. While it seems not a lot but with this edge you can consistently grow your account.

What if you find that your system loses 65 times out of 100 and wins 35 times. Then the expectation is 30*30/100-15*70=-1.5. The expectation is negative. Even if you are losing only pip and half per trade you will be consistently decreasing amount of money in your account.

This is one of the reasons why I strongly recommend practicing execution of your trading system. It will do two things for you. It will develop discipline to act upon your trading system signals. The second very important thing it will give you data to calculate the mathematical expectation of your system. If after long period of testing you find that expectation keeps being negative then switch the system.

It always surprises me when I see people trade a system and have no clue what is the mathematical expectation of their system. Even more surprisingly I see some people trade systems with negative expectations. You need to know the edge of your system and if it is positive you need to be disciplined to follow through your trading plan of executing it.

Albert Schmidt is a part-time currency trader. After quite a long time of struggle he learned to make consistent profit trading in Forex. Review a trading strategy he successfully uses in his trades.

Article Source: http://EzineArticles.com/?expert=Albert_Schmidt

Forex Ruby Code

I hope to continue to create this open source ruby trading system. For those interested, as I continue this project all the code will be made publicly available as is permissible with regards to the trading platform it works with.


Thank you to all whom try my code and do with as you please. It is being released under GPL.

If you feel generous please donate so I can continue this project and others like it.
Thank you

Wednesday, October 8, 2008

Ruby Forex Code Part 5

#--------------------------------------------------
# Retreive and format currency pairs
# Matt Hayford
# October 2008
#--------------------------------------------------

class RateData
require 'net/http'

attr_accessor :rates, :parsedrates

def getrate(key)
query = Hash.new
query['Key'] = key
url = URI.parse('http://api.efxnow.com/DEMOWebServices2.8/Service.asmx/GetRatesBlotter')
res = Net::HTTP.post_form(url, query)
@rates = /.*>.*\s*.*>(.*)<.*/.match(res.body)[1]
end

def parserate
parsedrates = @rates
@rates = parsedrates.gsub(/\\/, " ")
parsedrates = @rates
@rates = parsedrates.gsub(/\$/, "\n")
# do bunch of fancy parsing to remove delimiters and format info
# return @rates = @parsedrates
end

def returnrate
return @rates
end

end