strange problem with Point

 

Hi, if I write in an expert Print(Point) I obtain 0 as answer in the expert advisor tab.

When I apply the expert to EUR_USD I expect that point is 0.0001.

What is wrong? I'm using an Alpari demo account.

Thank you!

 

"Data of double type are printed with 4 decimal digits after point. To output more precisely, use the DoubleToStr() function"

could it be that subPip broker? ie, 3,5 // 0.001,0.00001

try DoubleToStr(Point,8) to expose all 8 decimal digits..

eg, Alpari

Print("Digits=",Digits,", Point=",DoubleToStr(Point,8));
2008.12.12 15:41:58 _test USDJPY,H1: Digits=3, Point=0.00100000
2008.12.12 15:40:53 _test GBPUSD,H1: Digits=5, Point=0.00001000

 

Ok, I wrote Print(DoubleToStr(Point,8)) in the expert and I obtain 0.00001.

I don't like it.

I will use another why to determine the point, for instance

double Punto()
{
if (Symbol()=="EURUSD"||Symbol()=="USDCHF"||Symbol()=="USDCAD"||Symbol()=="EURGBP"||Symbol()=="GBPUSD"||Symbol()=="EURCHF"||Symbol()=="AUDUSD")
{
Punto = 0.0001;
return (Punto);
}
if (Symbol()=="EURJPY"||Symbol()=="USDJPY")
{
Punto = 0.01;
return (Punto);
}
}

 

fwiw - wat about :

.

double Punto (string sSym)

{

return(MarketInfo(sSym,MODE_POINT));
}

.

int Digito (string sSym)

{

return(MarketInfo(sSym,MODE_DIGITS));

}

 

I wrote this .mqh file, and I hope to includ it on my experts, but I receive the error "no function defined" and "expression on global scope not allowed".

Could you help me? Thanks!

int Punto;

Punto()
{
if (Symbol()=="EURUSD"||Symbol()=="USDCHF"||Symbol()=="USDCAD"||Symbol()=="GBPUSD"||Symbol()=="EURCHF"||Symbol()=="AUDUSD")
{
Punto = 0.0001;
return (Punto() );
}
if (Symbol()=="EURJPY"||Symbol()=="USDJPY"||Symbol()=="CHFJPY")
{
Punto = 0.01;
return (Punto() );
}
if (Symbol()=="EURGBP")
{
Punto = 0.00001;
return (Punto() );
}
}