profit value is not right

To add comments, please log in or register
griffcho16
28
griffcho16  
if (MathAbs(Ask - OrderOpenPrice()) >= 100 * Point){
        Alert(Ask, " ", Bid);
        res = OrderClose(ticket, lots, Bid, 3);
}

if (MathAbs(Bid - OrderOpenPrice()) >= 100 * Point) {
        Alert(Ask, " ", Bid);
        res = OrderClose(ticket, lots, Ask, 3);
}

I have been using this to close any pending position if the price has changed more than or equals to 10 pips, but I have been getting profit ranging from 0.83 to 0.5, never reach 1.0 or 0.9 something.

Weird thing is when the trade was not profitable, the value ranges from -1.1 to 0.93.

I do not understand why is this happening 

Catalin Zachiu
13385
Catalin Zachiu  
griffcho16:

I have been using this to close any pending position if the price has changed more than or equals to 10 pips, but I have been getting profit ranging from 0.83 to 0.5, never reach 1.0 or 0.9 something.

Weird thing is when the trade was not profitable, the value ranges from -1.1 to 0.93.

I do not understand why is this happening 

If Bid-orderOpenPrice>=100*point
Close buy order
If orderOpenPrice-Ask>=100*point
To add comments, please log in or register