doshur: who has the sweetest function to convert pips to point?

I'll just cut_to_the_chase here to avoid a lengthy explanation/probing_you. I believe what you're looking for is something to convert the Integer_Representation of Pip into Integer_Representation of Point. Example:

int _Stoploss= 20; // Enter Value In Pipsint _TakeProf= 40; // Enter Value In Pipsint _Slippage= 2; // Enter Value In PipsvoidOnTick(){
ulong Deviation = (ulong) Pips_to_Points( _Slippage ) ;
mytrade.SetDeviationInPoints( Deviation );
}
int Pips_to_Points( int my_pips ){
/* This function converts Integer_Representation of Pips into Integer_Representation of Points */int result=0;
int ChartSymDigits=Digit();
if( ChartSymDigits % 2 == 1){ result = my_pips*10; }else{ result=my_pips; }
return( result );
}

The example could be made shorter. However the %2 is the sweetest/shortest version I've seen.

I'll just cut_to_the_chase here to avoid a lengthy explanation/probing_you. I believe what you're looking for is something to convert the Integer_Representation of Pip into Integer_Representation of Point. Example:

...

//note: %2 upon a function may not work in mql5 but there u have it. untested.

Why didyou not usethe SRC button ? Please edit your post. Thanks

I'll just cut_to_the_chase here to avoid a lengthy explanation/probing_you. I believe what you're looking for is something to convert the Integer_Representation of Pip into Integer_Representation of Point. Example:

The example could be made shorter. However the %2 is the sweetest/shortest version I've seen.

//note: %2 upon a function may not work in mql5 but there u have it. untested.

angevoyageur: It's YOUR definition, so of course it's very precise to you. What you said confirm exactly what I wrote : "A pip is a very unprecise unit." Its definition varies from person to person. What you define as a pip is actually a point.

I totally agree that pip is today an imprecise unit that definition varies from person to person.

I mean today because one day in the past, when 1 pip was 1 point for Forex, it was precise.

However, now we have more digits and platforms, like MT5, trading Forex and Stocks, where pips have no precise meaning as points do. So now we don't have anymore a standard pips definition, because points value is not static.

So, with this change, we don't have more a precise pip definition, since someone can use old reference (pip==0.0001 for EUR/USD) and other can use pips as the same as points (pip==point). To be honest, I prefer the old one, since I was used to, but you can use your reference for pip and you are right to, since original definition of pip was really one point in Forex.

Anyway, I just see two possibilities for pip definition. The old one (pip==0.0001 for EUR/USD forever) or the new one (pip==point whatever value point is now or will be in the future). What do you guys prefer?

doshur:who has the sweetest function to convert pips to point?I'll just cut_to_the_chase here to avoid a lengthy explanation/probing_you. I believe what you're looking for is something to convert the Integer_Representation of Pip into Integer_Representation of Point. Example:

The example could be made shorter. However the %2 is the sweetest/shortest version I've seen.

//note: %2 upon a function may not work in mql5 but there u have it. untested.

29862

Ubzen:I'll just cut_to_the_chase here to avoid a lengthy explanation/probing_you. I believe what you're looking for is something to convert the Integer_Representation of Pip into Integer_Representation of Point. Example:

...//note: %2 upon a function may not work in mql5 but there u have it. untested.

angevoyageur:Why did you not use the SRC button ? Please edit your post.

How do I get the digits after the decimal point ?

Example: 2.2034 =

4 digits29862

FinGeR:How do I get the digits after the decimal point ?

Example: 2.2034 =

4 digitsUbzen:I'll just cut_to_the_chase here to avoid a lengthy explanation/probing_you. I believe what you're looking for is something to convert the Integer_Representation of Pip into Integer_Representation of Point. Example:

The example could be made shorter. However the %2 is the sweetest/shortest version I've seen.

//note: %2 upon a function may not work in mql5 but there u have it. untested.

18058

FinGeR:How do I get the digits after the decimal point ?

Example: 2.2034 =

4 digits_Digits? orSymbolInfoInteger()with SYMBOL_DIGITS ?I mean only

_Digits101647

Forum on trading, automated trading systems and testing trading strategies

Press review

newdigital, 2014.01.06 18:38

What is the Pip Cost for Gold and Silver?Gold: Symbol XAU/USDThe pip cost for 1 ounce of Gold (minimum trade size) is $0.01 per pip.

Silver: Symbol XAG/USDThe pip cost for 50 ounces of Silver (minimum trade size) is $0.50 per pip

46420

angevoyageur:It's YOUR definition, so of course it's very precise to you. What you said confirm exactly what I wrote : "A pip is a very unprecise unit." Its definition varies from person to person. What you define as a pip is actually a point.

I totally agree that pip is today an imprecise unit that definition varies from person to person.

I mean today because one day in the past, when 1 pip was 1 point for Forex, it was precise.

However, now we have more digits and platforms, like MT5, trading Forex and Stocks, where pips have no precise meaning as points do. So now we don't have anymore a standard pips definition, because points value is not static.

So, with this change, we don't have more a precise pip definition, since someone can use old reference (pip==0.0001 for EUR/USD) and other can use pips as the same as points (pip==point). To be honest, I prefer the old one, since I was used to, but you can use your reference for pip and you are right to, since original definition of pip was really one point in Forex.

Anyway, I just see two possibilities for pip definition. The old one (pip==0.0001 for EUR/USD forever) or the new one (pip==point whatever value point is now or will be in the future). What do you guys prefer?