28评论

0收藏

发个任何方向刷单源码不要金币( 有点小错,懂的人用)

 

avatar xiaosong | 6766 人阅读 | 28 人评论 | 2013-01-09

  1. //+------------------------------------------------------------------+
  2. //| 超级5M Scalper.mq4 |
  3. //| |
  4. //|
  5. //+------------------------------------------------------------------+
  6. #property copyright "从mpfx借来的一些code"
  7. #property link ""

  8. #include <stdlib.mqh>

  9. extern double Lots = 0.01;
  10. extern double TakeProfit = 10;
  11. extern double Stoploss = 17;
  12. extern double TrailingStop = 9;
  13. extern double Slippage = 2;
  14. extern double risk = 5.0;
  15. extern double Pips = 16;
  16. extern double Perc = 5;
  17. double Points;
  18. //int color arrow_color=CLR_NONE;

  19. int init ()
  20. {
  21. Points = MarketInfo (Symbol(), MODE_POINT);
  22. //----
  23. return(0);
  24. }
  25. //+------------------------------------------------------------------+
  26. //| |
  27. //+------------------------------------------------------------------+
  28. int deinit()
  29. {
  30. return(0);
  31. }
  32. //+------------------------------------------------------------------+

  33. //+------------------------------------------------------------------+
  34. //| expert start function |
  35. //+------------------------------------------------------------------+
  36. int start()
  37. {
  38. double Levv=0;
  39. int cnt=0, total;

  40. if(Bars<100)
  41. {
  42. Print("bars less than 100");
  43. return(0);
  44. }
  45. if(OrdersTotal()<1)
  46. {
  47. if(AccountFreeMargin()<(1000*Lots))
  48. {
  49. Print("没钱了");
  50. return(0);
  51. }
  52. Levv= (MathCeil(AccountEquity() * risk / 10000)/10);


  53. // (BUY)
  54. if (Close[1]>Close[2]&&Close[2]>Close[3])
  55. {
  56. OrderSend(Symbol(),OP_BUY,Levv,Bid,Slippage,Bid-Stoploss*Points,Ask+TakeProfit*Points,0,0,Red);
  57. return(0);
  58. }

  59. // (SELL)
  60. if (Close[1]<Close[2]&&Close[2]>Close[3])
  61. {
  62. OrderSend(Symbol(),OP_SELL,Levv,Ask,Slippage,Ask+Stoploss*Points,Bid-TakeProfit*Points,0,0,Red);
  63. return(0);
  64. }
  65. }

  66. total=OrdersTotal();
  67. for(cnt=0;cnt<OrdersTotal();cnt++)
  68. {
  69. OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
  70. if(OrderType()<=OP_SELL && OrderSymbol()==Symbol())
  71. {
  72. if(OrderType()==OP_BUY)
  73. {
  74. //if((OrderOpenTime() - (CurTime() >= 300))|| (AccountProfit() >20))
  75. if((CurTime() - (OrderOpenTime() >= 300)) || (AccountProfit() >20))
  76. {
  77. OrderClose(OrderTicket(),OrderLots(),Ask,0,Violet);
  78. return(0);
  79. }
  80. }
  81. }
  82. }

  83. total=OrdersTotal();
  84. for(cnt=0;cnt<OrdersTotal();cnt++)
  85. {
  86. OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
  87. if(OrderType()<=OP_BUY && OrderSymbol()==Symbol())
  88. {
  89. if(OrderType()==OP_SELL)
  90. {
  91. //if ((OrderOpenTime() - (CurTime() >= 300))|| (AccountProfit() >20))//1 Day//
  92. if((CurTime() - (OrderOpenTime() >= 300)) || (AccountProfit() >20))
  93. {
  94. OrderClose(OrderTicket(),OrderLots(),Bid,0,Violet);
  95. return(0);
  96. }
  97. }
  98. }
  99. }
  100. }
复制代码
编译能通过的。但是你要改一下就能用了无论哪个品种和时间段都能用的。一上手就动作。漫无方向。
大趋势大动作小趋势小动作,把数据优化一下可以  做你的grail
""
还没有人打赏,支持一下

评论|共 28 个

雷萨

发表于 2013-1-9 10:59:00 | 显示全部楼层

自己知道了  

dengshan

发表于 2013-1-9 10:59:00 | 显示全部楼层

不错不错,我喜欢看  

闲暇时光在这里

发表于 2013-1-9 10:59:00 | 显示全部楼层

(*^__^*) 嘻嘻……  

淘宝EA

发表于 2013-1-9 11:01:55 | 显示全部楼层

孜孜不倦, 吾等楷模 …………  

仓木

发表于 2013-1-9 11:01:55 | 显示全部楼层

加油啊!!!!顶哦!!!!!  

醉鬼

发表于 2013-2-23 11:15:07 | 显示全部楼层

感谢您的分享,俺学习了!
W020120810308275193754.jpg

南极

发表于 2013-8-19 11:22:02 | 显示全部楼层

[s:132][s:132]

初学外汇

发表于 2013-8-19 12:49:25 | 显示全部楼层

[s:143][s:143][s:143][s:143][s:143][s:143]

恒久毅力

发表于 2013-8-30 22:09:42 | 显示全部楼层

[s:146][s:146][s:146]

123下一页
您需要登录后才可以回帖 登录 | 注册 微信登录

EA之家评论守则