论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
查看:2580回复:7
wjd76
注册时间2006-05-03
Ichimoku5的自动交易程序
楼主发表于:2006-08-02 03:21只看该作者倒序浏览
1楼 电梯直达
电梯直达
从老外的网站上弄到1个叫 Ichimoku5的自动交易程序,用历史数据测试成绩甚是厉害, 500刀起 0。1手的MINI,做欧元或者磅, 任何时候只下1单, 在单边的月份里可能一个月3000多收入, 在7月的震荡里还有700多收入呢。 但是在高兴了几天以后忽然发现我的测试模式有问题,似乎用“每个tick(根据所有可利用最少期限的每一个tick的分数插枝法)” 才能是比较真实的情况。而我测试的时候经常用“控制点数(根据最近最小期限内的12个控制电。。。)”的模式来测试。 听群里的高人说 Ichimoku 指标是个双刃剑,用不好会死的很惨。 希望能有高人给搞一搞,看看着东西应该怎么用。 或者有兴趣的兄弟们可以24挂模拟号帮助一起给测测吧。:lol 图贴翻了,呵呵, 奶奶的不让贴RAR附件 [ 本帖最后由 wjd76 于 2006-8-2 11:24 编辑 ]TesterGraph.gifTesterGraph.gifStrategyTester.gifStrategyTester.gif
TK29帖子1楼右侧xm竖版广告90-240
个性签名

韬客社区www.talkfx.co

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
wjd76
注册时间2006-05-03
楼主发表于:2006-08-02 08:30只看该作者
2楼
小气鬼,贴个地址都不让,我粘代码没问题吧! //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //| Copyright 2005, bobammax | //| | //+------------------------------------------------------------------+ #property copyright "Copyright 2005, bobammax aka foreverold" #property link "" #define MAGIC 85718 extern double lStopLoss = 37; extern double sStopLoss = 35; extern double lTakeProfit = 80; extern double sTakeProfit = 75; extern double lTrailingStop = 20; extern double sTrailingStop = 20; extern color clOpenBuy = Blue; extern color clCloseBuy = Aqua; extern color clOpenSell = Red; extern color clCloseSell = Violet; extern color clModiBuy = Blue; extern color clModiSell = Red; extern string Name_Expert = "Ichimoku"; extern int Slippage = 4; extern bool UseSound = True; extern string NameFileSound = "alert.wav"; extern double Lots = 1.00; void deinit() { Comment(""); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int start(){ if(Bars<100){ Print("bars less than 100"); return(0); } if(lStopLoss<10){ Print("StopLoss less than 10"); return(0); } if(lTakeProfit<10){ Print("TakeProfit less than 10"); return(0); } if(sStopLoss<10){ Print("StopLoss less than 10"); return(0); } if(sTakeProfit<10){ Print("TakeProfit less than 10"); return(0); } double diCustom0=iCustom(NULL, 240, "Ichimoku", 9, 26, 52, 0, 0); double diCustom1=iCustom(NULL, 240, "Ichimoku", 9, 26, 52, 1, 0); double diCustom2=iCustom(NULL, 240, "Ichimoku", 9, 26, 52, 1, 0); double diMA3=iMA(NULL,240,34,0,MODE_EMA,PRICE_CLOSE,0); double diCustom4=iCustom(NULL, 240, "Ichimoku", 9, 26, 52, 1, 0); double diCustom5=iCustom(NULL, 240, "Ichimoku", 9, 26, 52, 0, 0); if(AccountFreeMargin()<(1000*Lots)){ Print("We have no money. Free Margin = ", AccountFreeMargin()); return(0); } if (!ExistPositions()){ if ((diCustom0>diCustom1 && diCustom2>diMA3)){ OpenBuy(); return(0); } if ((diCustom4>diCustom5)){ OpenSell(); return(0); } } TrailingPositionsBuy(lTrailingStop); TrailingPositionsSell(sTrailingStop); return (0); } bool ExistPositions() { for (int i=0; itrailingStop*Point) { if (OrderStopLoss()trailingStop*Point) { if (OrderStopLoss()>Ask+trailingStop*Point || OrderStopLoss()==0) ModifyStopLoss(Ask+trailingStop*Point); } } } } } } void ModifyStopLoss(double ldStopLoss) { bool fm; fm = OrderModify(OrderTicket(),OrderOpenPrice(),ldStopLoss,OrderTakeProfit(),0,CLR_NONE); if (fm && UseSound) PlaySound(NameFileSound); } void OpenBuy() { double ldLot, ldStop, ldTake; string lsComm; ldLot = GetSizeLot(); ldStop = GetStopLossBuy(); ldTake = GetTakeProfitBuy(); lsComm = GetCommentForOrder(); OrderSend(Symbol(),OP_BUY,ldLot,Ask,Slippage,ldStop,ldTake,lsComm,MAGIC,0,clOpenBuy); if (UseSound) PlaySound(NameFileSound); } void OpenSell() { double ldLot, ldStop, ldTake; string lsComm; ldLot = GetSizeLot(); ldStop = GetStopLossSell(); ldTake = GetTakeProfitSell(); lsComm = GetCommentForOrder(); OrderSend(Symbol(),OP_SELL,ldLot,Bid,Slippage,ldStop,ldTake,lsComm,MAGIC,0,clOpenSell); if (UseSound) PlaySound(NameFileSound); } string GetCommentForOrder() { return(Name_Expert); } double GetSizeLot() { return(Lots); } double GetStopLossBuy() { return (Bid-lStopLoss*Point);} double GetStopLossSell() { return(Ask+sStopLoss*Point); } double GetTakeProfitBuy() { return(Ask+lTakeProfit*Point); } double GetTakeProfitSell() { return(Bid-sTakeProfit*Point); } [ 本帖最后由 wjd76 于 2006-8-2 16:31 编辑 ]
wjd76
注册时间2006-05-03
楼主发表于:2006-08-02 08:33只看该作者
3楼
更正一下,最上面的图可能有错误,好像MT4的测试功能有BUG,有时候疯赚,有时候爆仓,我还在研究中。 请有兴趣的大虾跟贴 本人没有义务回答,如何编译程序、代码该放在哪个文件夹等初级问题。 谢谢 [ 本帖最后由 wjd76 于 2006-8-2 16:35 编辑 ]
风雨无阻
注册时间2004-03-27
发表于:2006-08-03 07:21只看该作者
4楼
网络就是好,大家可以优势互补。 我是专门回答初级问题的,欢迎大家踊跃垂询。
个性签名

互相学习、促进交流、共同提高。

studyseng
注册时间2005-12-05
发表于:2006-08-03 09:14只看该作者
5楼
能不能贴个附件出来啊!
chenai
注册时间2005-01-26
cobra1111
注册时间2006-02-09
发表于:2006-08-18 07:13只看该作者
8楼
测试没用的 最好的方法是24小时挂机测试 模拟单测试的结果 和真实操作也是会有区别的

本站免责声明:

1、本站所有广告及宣传信息均与韬客无关,如需投资请依法自行决定是否投资、斟酌资金安全及交易亏损风险;

2、韬客是独立的、仅为投资者提供交流的平台,网友发布信息不代表韬客的观点与意思表示,所有因网友发布的信息而造成的任何法律后果、风险与责任,均与韬客无关;

3、金融交易存在极高法律风险,未必适合所有投资者,请不要轻信任何高额投资收益的诱导而贸然投资;投资保证金交易导致的损失可能超过您投入的资金和预期。请您考虑自身的投资经验及风险承担能力,进行合法、理性投资;

4、所有投资者的交易帐户应仅限本人使用,不应交由第三方操作,对于任何接受第三方喊单、操盘、理财等操作的投资和交易,由此导致的任何风险、亏损及责任由投资者个人自行承担;

5、韬客不隶属于任何券商平台,亦不受任何第三方控制,韬客不邀约客户投资任何保证金交易,不接触亦不涉及投资者的任何资金及账户信息,不代理任何交易操盘行为,不向客户推荐任何券商平台,亦不存在其他任何推荐行为。投资者应自行选择券商平台,券商平台的任何行为均与韬客无关。投资者注册及使用韬客即表示其接受和认可上述声明,并自行承担法律风险。

版权所有:韬客外汇论坛 www.talkfx.com 联络我们:[email protected]