Modifying stop orders ? - page 2

 
NewPrice = FALSE;
NewStop = FALSE;
NewPriceValid = FALSE;
NewStopValid = FALSE;
if (MathAbs(PriceBuy - OrderOpenPrice()) > MoveStep * Point) NewPrice = TRUE;
if (MathAbs(SL_BUY - OrderStopLoss()) > Point) NewStop = TRUE;
if ((OrderOpenPrice() - Ask)     > (StopLevel * Point) ) NewPriceValid = TRUE;
if ((OrderOpenPrice() - SL_BUY)  > (StopLevel * Point) ) NewStopValid = TRUE;    
can be simplified
bool NewPrice       = MathAbs(PriceBuy - OrderOpenPrice()) > MoveStep * Point;
bool NewStop        = MathAbs(SL_BUY - OrderStopLoss())    > Point;
bool NewPriceValid  = OrderOpenPrice() - Ask               > StopLevel * Point;
bool NewStopValid   = OrderOpenPrice() - SL_BUY            > StopLevel * Point;
Reason: