有没有平仓后立即反向下单的面板
如题谢谢 谁跟你说空完就一定是多?谁跟你说多完就一定是空? 有很多这样的 我也想要一个,找不到这又是什么策略,你反向下单,但市场可未必是反向 谢谢 {:1_194:} 顶下 很多下单面板里边有反手按键,就是平掉当前,反手开仓
//+-------------- 反手订单----------------------------------------------------+
int Reverse_Button (const string sparam)
{
int total=OrdersTotal();
int i = 0;
for(i = total; i >=0; i--)
{
if(OrderSelect(i,SELECT_BY_POS) &&OrderSymbol()==Symbol())
{
if(OrderType()==OP_BUY)
{
ticket = OrderSend(Symbol(),OP_SELL,OrderLots()*Koeff,Bid,slip,0,0,"Reverse Sell",MagicS,0,clrNONE);
ticket = OrderClose(OrderTicket(),OrderLots(),Bid,slip,clrNONE);
PlaySound("click.wav");
SlTp();
}
else if(OrderType()==OP_SELL)
{
ticket = OrderSend(Symbol(),OP_BUY,OrderLots()*Koeff,Ask,slip,0,0,"Reverse Buy",MagicB,0,clrNONE);
ticket = OrderClose(OrderTicket(),OrderLots(),Ask,slip,clrNONE);
PlaySound("click.wav");
SlTp();
}
}
}
return(0);
}
页:
[1]