# position.Profit() convert to pips

10

Hi, everybody

So i look for the solution to convert the profts to pips ...

i use the class  CPositionInfo

CPositionInfo _position = new CPositionInfo;

Comment(DoubleToString(position.Profit())); <<<< the value is money

how convert the "position.Profit()" to pips ??

Help me please .... thank you

Moderator
158054

20188628:

Hi, everybody

So i look for the solution to convert the profts to pips ...

i use the class  CPositionInfo

CPositionInfo _position = new CPositionInfo;

Comment(DoubleToString(position.Profit())); <<<< the value is money

how convert the "position.Profit()" to pips ??

Help me please .... thank you

Use the difference between PriceOpen and PriceCurrent and SYMBOL_DIGITS. Just set your correct symbol:

```   CPositionInfo my_pos;

double difference;
my_pos.Select(Symbol());
difference=my_pos.PriceCurrent()-my_pos.PriceOpen();
else
difference=my_pos.PriceOpen()-my_pos.PriceCurrent();

long symbol_digits=SymbolInfoInteger(my_pos.Symbol(),SYMBOL_DIGITS);
int profit_pips=(int)(difference*MathPow(10,symbol_digits));
Print("Profit in pips: ",profit_pips);```
10

Use the difference between PriceOpen and PriceCurrent and SYMBOL_DIGITS. Just set your correct symbol:

Very nice ... thank you so much

16

20188628:

Hi, everybody

So i look for the solution to convert the profts to pips ...

i use the class  CPositionInfo

CPositionInfo _position = new CPositionInfo;

Comment(DoubleToString(position.Profit())); <<<< the value is money

how convert the "position.Profit()" to pips ??

Help me please .... thank you

pip = OrderProfit() / MarketInfo(Symbol(), MODE_TICKVALUE)