外汇Mt4编程自己编写EA如何实现每隔一个时间就开一单?

2024-11-06 19:27:45
推荐回答(2个)
回答1:

if (iTime(NULL,0,0)= 客户自定义);
{

ticket_buy=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,"",MAGIC_MA,0,Blue);
if(ticket_buy>0)
{
billbuy_ok=true;
if(OrderSelect(ticket_buy,SELECT_BY_TICKET,MODE_TRADES))
{
Print("BUY order opened : ",OrderOpenPrice());
/* if(SL>0 && OrderStopLoss()==0)
OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()-SL*Point,OrderTakeProfit(),0,Green);
if(TP>0 && OrderTakeProfit()==0)
OrderModify(OrderTicket(),OrderOpenPrice(),OrderStopLoss(),OrderOpenPrice()+TP*Point,0,Green);
*/
}
}
else
{
billbuy_ok=false;

Print("Error opening BUY order : ",GetLastError());
}

原理大概就是这样

回答2:

可以有,不免费,需要就追问