以下这个EA脚本~必须设定为需要人工确认~它才会要开单~...
是不是我哪里写错了~请牛大指点一下~
//+------------------------------------------------------------------+
//| MACD Sample.mq4 |
//| Copyright ?2005, MetaQuotes Software Corp. |
//|
//+------------------------------------------------------------------+
extern double TakeProfit = 5;
extern double Lots = 1;
extern double TrailingStop = 25;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{
if(OrdersTotal()==0&&High[1]+20*Point)
{
OrderSend(Symbol(),OP_BUYSTOP,1,Ask,3,Bid-250*Point,Bid+50*Point,\"pending1\",1234,0,Blue);
}
if(OrdersTotal()==1&&Low[1]-20*Point)
{
OrderSend(Symbol(),OP_SELLSTOP,1,Bid,3,Ask-250*Point,Ask+50*Point,\"pending2\",1234,0,Blue);
}
return(0);
} |