设万维读者为首页 广告服务 联系我们 关于万维
简体 繁体 手机版
分类广告
版主:股民甲远古的风
万维读者网 > 股市财经 > 帖子
做了个炒外汇的网站
送交者: 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)