How transfer OrderProfit() to profit in pips ?

 
How transfer OrderProfit() to profit in pips ?

OrderProfit() /OrderLots () /???? = ????? profit in pips ?
 
profit in pips is the difference between openprice and closeprice divided by point
 
closeprice?
NO, but how about when the order has not been closed ?

MathAbs( (openprice - (BID+ASK)/2)/Point) .

 Right?
 

buy orders will be closed at Bid, so Bid-OrderOpenPrice()
sell orders at Ask, so OrderOpenPrice()-Ask

 

for(int pos=0; pos<=OrdersTotal(); pos++)

{
if(OrderSelect(pos, SELECT_BY_POS)==true)
{
if(OrderType() == OP_BUY)
Alert("Profit for the order #",pos," is: ",(OrderClosePrice()-OrderOpenPrice())/MarketInfo(OrderSymbol(),MODE_POINT));
else if(OrderType() == OP_SELL)
Alert("Profit for the order #",pos," is: ",(OrderOpenPrice()-OrderClosePrice())/MarketInfo(OrderSymbol(),MODE_POINT));
}
else
Print("OrderSelect returned the error of ",GetLastError());

}


This is my first post... hello everybody :D

 
( OrderProfit() - OrderCommision() ) / OrderLots() / MarketInfo( OrderSymbol(), MODE_TICKVALUE )