Does any1 know how to count pips? - page 2

 
fxbs:
right, and since we can't retrieve all the history data there is common method of averaging (make sense)

as RR mentioned :

QUOTE=ralph.ronnquist;194990]if there is an open price and a close price, you take their difference and divide by the point size.[/QUOTE

hi fxbs I am writing my first expert , I am using this funciton but I am not sure its 100% correct, sorry I am still debugging my code but I hope you get the idea

//+------------------------------------------------------------------+

//| COUNT THE PIPS IN LOSS |

//+------------------------------------------------------------------+

double LossPips (int mgc) // function will count the open pips & return LossPips

{

for(nCnt = 0; nCnt < OrdersTotal(); nCnt++)

{

int PipsOpenPL=0;

OrderSelect(nCnt, SELECT_BY_POS, MODE_TRADES);

if(OrderMagicNumber() == mgc)

{

if (OrderType()==OP_BUY)

{

PipsOpenPL=PipsOpenPL+MathRound((OrderClosePrice()-OrderOpenPrice())/MarketInfo(Symbol(),MODE_POINT));

}

if (OrderType()==OP_SELL)

{

PipsOpenPL=PipsOpenPL+MathRound((OrderOpenPrice()-OrderClosePrice())/MarketInfo(Symbol(),MODE_POINT));

}

}

return(PipsOpenPL);

}

}

fxbs:
it' s not funny .....

come on it was funny

 

yea, funny - mayby to everybody except Togu

MiniMi- about expert - i don't know, sorry Something i know(or heard) something don't

but many people knows this stuff, i believe they will answer

Reason: