2楼
猎豹的那个均线帖子也找不到了?:')
韬客社区www.talkfx.co
发表于:2012-10-21 17:58只看该作者
3楼
路过,观望,学习
韬客社区www.talkfx.co
发表于:2012-10-22 00:51只看该作者
5楼
MT4本身不就可以画箭头吗。
捕获.PNG
韬客社区www.talkfx.co
发表于:2012-10-22 00:55只看该作者
6楼
我刚刚在1。3032空了,你还得多做什么,看我赚一波下跌得情吧
韬客社区www.talkfx.co
发表于:2012-10-22 01:07只看该作者
7楼
空啊,还不到多的时候!
韬客社区www.talkfx.co
8楼
韬客社区www.talkfx.co
发表于:2012-10-22 13:18只看该作者
9楼
密切关注。。。:037:
赌博心法是忍、等、稳、狠、滚。
发表于:2012-10-22 13:56只看该作者
10楼
韬客社区www.talkfx.co
发表于:2012-10-22 14:16只看该作者
12楼
那就找人写。淘宝就有帮人写这个的。
其实如果你只是要均线金叉发信号。自己学一下,也不难的。
MetaQuotes4语言,你不需要会,你拿MT4里面的自带的几个出来研究一下,就能了解一些编法。
extern double TakeProfit = 50;
extern double Lots = 0.1;
extern double TrailingStop = 30;
extern double MACDOpenLevel=3;
extern double MACDCloseLevel=2;
extern double MATrendPeriod=26;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{
double MacdCurrent, MacdPrevious, SignalCurrent;
double SignalPrevious, MaCurrent, MaPrevious;
int cnt, ticket, total;
// initial data checks
// it is important to make sure that the expert works with a normal
// chart and the user did not make any mistakes setting external
// variables (Lots, StopLoss, TakeProfit,
// TrailingStop) in our case, we check TakeProfit
// on a chart of less than 100 bars
if(Bars<100)
{
Print("bars less than 100");
return(0);
}
if(TakeProfit<10)
{
Print("TakeProfit less than 10");
return(0); // check TakeProfit
}
// to simplify the coding and speed up access
// data are put into internal variables
MacdCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0);
MacdPrevious=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1);
SignalCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0);
SignalPrevious=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,1);
MaCurrent=iMA(NULL,0,MATrendPeriod,0,MODE_EMA,PRICE_CLOSE,0);
MaPrevious=iMA(NULL,0,MATrendPeriod,0,MODE_EMA,PRICE_CLOSE,1);
total=OrdersTotal();
if(total<1)
{
// no opened orders identified
if(AccountFreeMargin()<(1000*Lots))
{
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}
// check for long position (BUY) possibility
if(MacdCurrent<0 && MacdCurrent>SignalCurrent && MacdPrevious(MACDOpenLevel*Point) && MaCurrent>MaPrevious)
{
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,"macd sample",16384,0,Green);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
}
else Print("Error opening BUY order : ",GetLastError());
return(0);
}
// check for short position (SELL) possibility
if(MacdCurrent>0 && MacdCurrentSignalPrevious &&
MacdCurrent>(MACDOpenLevel*Point) && MaCurrent0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("SELL order opened : ",OrderOpenPrice());
}
else Print("Error opening SELL order : ",GetLastError());
return(0);
}
return(0);
}
// it is important to enter the market correctly,
// but it is more important to exit it correctly...
for(cnt=0;cnt0 && MacdCurrentSignalPrevious &&
MacdCurrent>(MACDCloseLevel*Point))
{
OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet); // close position
return(0); // exit
}
// check for trailing stop
if(TrailingStop>0)
{
if(Bid-OrderOpenPrice()>Point*TrailingStop)
{
if(OrderStopLoss()SignalCurrent &&
MacdPrevious(MACDCloseLevel*Point))
{
OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet); // close position
return(0); // exit
}
// check for trailing stop
if(TrailingStop>0)
{
if((OrderOpenPrice()-Ask)>(Point*TrailingStop))
{
if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0))
{
OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Red);
return(0);
}
}
}
}
}
}
return(0);
}
// the end.
韬客社区www.talkfx.co