設萬維讀者為首頁 廣告服務 技術服務 聯繫我們 關於萬維
簡體 繁體 手機版
分類廣告
版主:股民甲遠古的風
萬維讀者網 > 股市財經 > 帖子
做了個炒外匯的網站
送交者: yaag 2011年02月02日04:20:06 於 [股市財經] 發送悄悄話
炒了4年,寫了30多個自動交易系統。最近看了一些非常經典的交易書,按照這些書裡的自動交易系統又寫了程序,做了測試,感覺還不錯。

I will use the Moving Average Channels Trading System to demo trade EURUSD and GBPUSD.for 3 months, from 1 February to 30 April 2011, before I use it for my real money. I will report here if any trade is triggered, otherwise I will report the demo trading results every week.

The Moving Average Channels System was presented by Alexander Elder. The detailed de***ion of the system can be found in his Trading for a Living, one of the most popular trading books on Amazon. I wrote an EA and optimized the parameters, and would like to share my results with you. With these optimized parameters, the trading system can be summarised as follows:

The trading system for EURUSD is

(1) When EMA13 typical price rises 15 pips or more than 15 pips, buy at (EMA13 + 20 pips). Stop Loss and Take Profit are 200 and 400 pips respectively.

(2) When EMA13 typical price decreases 15 pips or more than 15 pips, sell at (EMA13 - 20 pips). Stop Loss and Take Profit are 200 and 400 pips respectively.

The trading system for GBPUSD is

(1) When EMA13 typical price rises 10 pips or more than 10 pips, buy at EMA13. Stop Loss and Take Profit are 50 and 300 pips respectively.

(2) When EMA13 typical price decreases 15 pips or more than 15 pips, sell at EMA13. Stop Loss and Take Profit are 50 and 300 pips respectively.

The backtest resultes generated by the optimization are summaried as follows.

EURUSD

For EURUSD, the STOP LOSS is 200 pips. If you have G USD in your account, and you want to control the risk under 2.00% for each trade, then trade size y should satisfy:

G x 2% = 200 pips x 0.0001 x y,

so y = G x 0.02 / 0.02 = G. That means the actual leverage should be 1:1. As Take Profit is 400 pips, this means the potential reward of each trade is 4%. The annual trade is 22, and the over-all winning chance is 0.56. So the annual return is
22x0.56x0.04-2x0.44x0.02= 29.92%

PS: If the entrance of trades is EMA13 instead of EMA13 plus minus 20 pips, and UP_CRITERIA is chosen to be 20 instead of 15 pips, the annual trade may be as few as 4, and the winning chance is 0.6. The annual return becomes

4 x0.6x0.04-4x0.4x0.02= 6.4%

If UP_CRITERIA is chosen to be 15 pips, the annual trade would become 13. The winning chance is 7/15. The annual return is then www.

13x(7/15)x0.04-13x(8/15)x0.02= 10.4%.

GBPUSD

For GBPUSD, the STOP LOSS is 50 pips. Again if you have G USD in your account, and you want to control the risk under 2.00% for each trade, then trade size y should satisfy:

G x 2% = 50 pips x 0.0001 x y,

so y = G x 0.02 / 0.005 = 4G. That means the actual leverage should be 1:4. As Take Profit is 300 pips, this means the potential reward of each trade is 12%. If the annual trade is 36, and the winning ratio is 0.3, then the annual return is

36 x0.3x0.12-36x0.7x0.02= 79.20%

The compound annual return of EURUSD and GBPUSD is 109.12%. I expect the real annual return to be around 30%.
0%(0)
0%(0)
標 題 (必選項):
內 容 (選填項):
實用資訊
回國機票$360起 | 商務艙省$200 | 全球最佳航空公司出爐:海航獲五星
海外華人福利!在線看陳建斌《三叉戟》熱血歸回 豪情築夢 高清免費看 無地區限制
一周點擊熱帖 更多>>
一周回復熱帖
歷史上的今天:回復熱帖
2009: 錢都到哪裡去了
2009: seems we've missed day trading
2007: camike10: 炒股高手多年心血結晶 (ZT)
2007: 股市人生 (ZT)