[讨论]5M剥头皮系统源码,懂的朋友测试下
非常简单的5M交易系统,基本上5M内就会平单,且有持仓的话,不会建仓。
1.将experts文件夹拷贝到mt4根目录下
2.启动mt4,打开某一货币对的1小时5M窗口,从智能交易系统中将 "5M剥头皮系统" 拖拽到窗口中。
3.参数说明:
Lots = 1.0;----用于判断保证金是否足够
TakeProfit = 10;---止盈
Stoploss = 17;---止损
TrailingStop = 9;---移动止损
Slippage = 2;---建仓误差
risk = 5.0;---用于计算每笔的交易量
=========================
源码:
#include
extern double Lots = 1.0;
extern double TakeProfit = 10;
extern double Stoploss = 17;
extern double TrailingStop = 9;
extern double Slippage = 2;
extern double risk = 5.0;
extern double Pips = 16;
extern double Perc = 5;
double Points;
//int color arrow_color=CLR_NONE;
int init ()
{
Points = MarketInfo (Symbol(), MODE_POINT);
//----
return(0);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int deinit()
{
return(0);
}
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
double Levv=0;
int cnt=0, total;
if(Bars<10)
{
Print("bars less than 100");
return(0);
}
if(OrdersTotal()<1)
{
if(AccountFreeMargin()<(1*Lots))
{
Print("BrokeAsAJoke");
return(0);
}
Levv= (MathCeil(AccountEquity() * risk / 10000)/10);
// (BUY)
if (Close[1]>Close[2])
{
OrderSend(Symbol(),OP_BUY,Levv,Bid,Slippage,Bid-Stoploss*Points,Ask+TakeProfit*Points,0,0,Red);
return(0);
}
// (SELL)
if (Close[1]= 300))|| (AccountProfit() >2))
if((CurTime() - (OrderOpenTime() >= 300)) || (AccountProfit() >2))
{
OrderClose(OrderTicket(),OrderLots(),Ask,0,Violet);
return(0);
}
}
}
}
total=OrdersTotal();
for(cnt=0;cnt= 300))|| (AccountProfit() >2))//1 Day//
if((CurTime() - (OrderOpenTime() >= 300)) || (AccountProfit() >2))
{
OrderClose(OrderTicket(),OrderLots(),Bid,0,Violet);
return(0);
}
}
}
}
}
My name is 张代理 ~
3楼
张翠山 发表于 2015-10-19 17:48
剥头皮指的不是利用两个平台报价快慢不统一来赚钱的行为吗? 一个平台怎么剥头皮
韬客社区www.talkfx.co
发表于:2015-10-19 11:11只看该作者
4楼
韬客社区www.talkfx.co
发表于:2015-10-19 11:28只看该作者
5楼
现在定义不就是持仓时间段,盈利几个点十来个点快进快出吧
韬客社区www.talkfx.co