double maxProfitPrice = 0.0;
void posProcess(){
int orders = OrdersTotal();
if(orders == 0) maxProfit =0.0;
if(orders>0){
for(int i=orders-1;i>=0;i–){
if(!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) continue;
if(isBuySymbol() ){
if(Bid>OrderStopLoss()+dTsp*pPoint /* && Bid>OrderOpenPrice() +dTsp*pPoint*/ ){
orderModifyTrailStop(Bid-dTsp*pPoint);
maxProfit = OrderProfit();
maxProfitPrice = Bid;
}
if(OrderProfit()>maxProfit && NormalizeDouble(maxProfit,Digits)>0.0){
maxProfit = OrderProfit();
maxProfitPrice = Bid;
请教高手这段代码 的意思?
请登录之后再进行评论
登录