}*/
if(pfLong>=多空个组获利金额 && 多空个组获利金额>0.0 && pfLong>0.0)
{
AlertMessage(strEA+" 获利平仓所有多组单,多组单获利金额"+DoubleToString(pfLong,2)+"元");
CloseOrders(strSym,-1,iMagic,"+B");
CheckOrderCurStatus(strSym,iMagic);
}
if(pfShort>=多空个组获利金额 && 多空个组获利金额>0.0 && pfShort>0.0)
{
AlertMessage(strEA+" 获利平仓所有空组单,空组单获利金额"+DoubleToString(pfShort,2)+"元");
CloseOrders(strSym,-1,iMagic,"+S");
CheckOrderCurStatus(strSym,iMagic);
}
if(pfLong<=MathAbs(多空个组止损金额)*-1.0 && MathAbs(多空个组止损金额)>0.0 && pfLong<0.0)
{
AlertMessage(strEA+" 止损平仓所有多组单,多组单亏损金额"+DoubleToString(pfLong,2)+"元");
CloseOrders(strSym,-1,iMagic,"+B");
CheckOrderCurStatus(strSym,iMagic);
}
if(pfShort<=MathAbs(多空个组止损金额)*-1.0 && MathAbs(多空个组止损金额)>0.0 && pfShort<0.0)
{
AlertMessage(strEA+" 止损平仓所有空组单,空组单亏损金额"+DoubleToString(pfShort,2)+"元");
CloseOrders(strSym,-1,iMagic,"+S");
CheckOrderCurStatus(strSym,iMagic);
}
///
if(dPLTotal>=整组获利金额 && 整组获利金额>0.0 && dPLTotal>0.0)
{
AlertMessage(strEA+" 获利平仓整组单,整单获利金额"+DoubleToString(dPLTotal,2)+"元");
CloseOrders(strSym,-1,iMagic);
CheckOrderCurStatus(strSym,iMagic);
}
if(dPLTotal<=MathAbs(整组止损金额)*-1.0 && MathAbs(整组止损金额)>0.0 && dPLTotal<0.0)
{
AlertMessage(strEA+" 止损平仓整组单,整单亏损金额"+DoubleToString(dPLTotal,2)+"元");
CloseOrders(strSym,-1,iMagic);
CheckOrderCurStatus(strSym,iMagic);
}
}
这个我也有啊,赚钱靠参数 |