发一段追迹止损的代码,求金币
{
Selected = OrderSelect(SellTicket,SELECT_BY_TICKET);
double CurrentPrice = Ask;
double SellStopPO = OrderOpenPrice();
double SellStopSL = OrderStopLoss();
double SellStopPips = SellStopSL-SellStopPO;
if(CurrentPrice SellStopPO-SellStopPips*1 CurrentPrice SellStopPO-SellStopPips*2 OrderType() == OP_SELL)
{
Selected = OrderSelect(SellTicket,SELECT_BY_TICKET);
double NewStopLoss = SellStopPO-SellStopPips*0.1;
bool TicketMod = OrderModify(SellTicket,OrderOpenPrice(),NewStopLoss,OrderTakeProfit(),OrderExpiration(),White);
}
if(CurrentPrice SellStopPO-SellStopPips*2 CurrentPrice SellStopPO-SellStopPips*3 OrderType() == OP_SELL)
{
Selected = OrderSelect(SellTicket,SELECT_BY_TICKET);
double NewStopLoss = SellStopPO-SellStopPips*1;
bool TicketMod = OrderModify(SellTicket,OrderOpenPrice(),NewStopLoss,OrderTakeProfit(),OrderExpiration(),White);
}
}
Selected = OrderSelect(SellTicket,SELECT_BY_TICKET);
double CurrentPrice = Ask;
double SellStopPO = OrderOpenPrice();
double SellStopSL = OrderStopLoss();
double SellStopPips = SellStopSL-SellStopPO;
if(CurrentPrice SellStopPO-SellStopPips*1 CurrentPrice SellStopPO-SellStopPips*2 OrderType() == OP_SELL)
{
Selected = OrderSelect(SellTicket,SELECT_BY_TICKET);
double NewStopLoss = SellStopPO-SellStopPips*0.1;
bool TicketMod = OrderModify(SellTicket,OrderOpenPrice(),NewStopLoss,OrderTakeProfit(),OrderExpiration(),White);
}
if(CurrentPrice SellStopPO-SellStopPips*2 CurrentPrice SellStopPO-SellStopPips*3 OrderType() == OP_SELL)
{
Selected = OrderSelect(SellTicket,SELECT_BY_TICKET);
double NewStopLoss = SellStopPO-SellStopPips*1;
bool TicketMod = OrderModify(SellTicket,OrderOpenPrice(),NewStopLoss,OrderTakeProfit(),OrderExpiration(),White);
}
}
打赏
最新创建圈子
新闻EA运行效果图圈 2020-01-01
圈主:admin 帖子:1
客服热线:

