[Is broker manipulate?] close order at price 0.00

 
void BtnClose(int myOP){
        
        ActiveOrderInt=0;
        
        for(CloseCount=(OrdersTotal()-1);CloseCount>=0;CloseCount--){
                if(OrderSelect(CloseCount,SELECT_BY_POS,MODE_TRADES)==true && OrderMagicNumber()==ID && StringCompare(OrderSymbol(),Symbol())==0){
                        if(OrderType()==myOP){
                                ActiveOrderInt+=1;
                        }
                }
        }
        
        CloseMaxTry=0;
        
        while(ActiveOrderInt>0 && CloseMaxTry<10){
                
                for(CloseCount=(OrdersTotal()-1);CloseCount>=0;CloseCount--){
                        if(OrderSelect(CloseCount,SELECT_BY_POS,MODE_TRADES)==true && OrderMagicNumber()==ID && StringCompare(OrderSymbol(),Symbol())==0){
                                if(OrderType()==myOP){
                                        if(myOP==OP_BUY){
                                                if(!OrderClose(OrderTicket(),OrderLots(),SymbolInfoDouble(OrderSymbol(),SYMBOL_BID),0,clrNONE)){
                                                        MarketError();
                                                }
                                        }
                                        if(myOP==OP_SELL){
                                                if(!OrderClose(OrderTicket(),OrderLots(),SymbolInfoDouble(OrderSymbol(),SYMBOL_ASK),0,clrNONE)){
                                                        MarketError();
                                                }
                                        }
                                }
                        }
                        
                }
                
                CloseMaxTry+=1;
                
                ActiveOrderInt=0;
                
                for(CloseCount=(OrdersTotal()-1);CloseCount>=0;CloseCount--){
                        if(OrderSelect(CloseCount,SELECT_BY_POS,MODE_TRADES)==true && OrderMagicNumber()==ID && StringCompare(OrderSymbol(),Symbol())==0){
                                if(OrderType()==myOP){
                                        ActiveOrderInt+=1;
                                }
                        }
                }
        }
}


above Journal message is using EA but

[Manually] press F9 new order sent a Market Order and quickly in 1 sec close it, getthe same message "close order at price 0.00"

 
Hao-Wei Lee: "close order at price 0.00"

Means nothing. The terminal has sent the close to the server, there is no close price until the server responds.

 
William Roeder:

Means nothing. The terminal has sent the close to the server, there is no close price until the server responds.


thanks the explanation but  to know more


Is this a serious problem(no close price) ?

and any solution to improve above BtnClose() code

 
Hao-Wei Lee:

Is this a serious problem(no close price) ?

and any solution to improve above BtnClose() code

I think there is little we can do to change how, when and what the system decides to display, which is cosmetics.

What really matters is - did your order close at a logical price (and not zero)? If not, then there's good cause to dig deeper.

 
Hao-Wei Lee:


Is this a serious problem(no close price) ?

If you look one line above that blue line you can see the response that the order was closed and at what price so there is no problem at all.