Error? the return of predefined variable "point" is 0...need explain

 

guys:

my mt4 version is build 406, and the demo account is alpari company.

i used the predefined variable "point", and found that the value is 0, which is not real in the real trading situation.

i also export the value of "marketinfo(symbol(), mode_point)", which is also 0.

somebody say that the marketinfo function only works when the terminal is logged.

but i have already log the account, and it still return 0.

i also export other value of marketinfo, e.g mode_digits, which is correct.

can anybody explain for me?


saji

 
Don't you mean Point and MODE_POINT . . . yes, they are case sensitive.
 
Print defaults to 4 places. On a 5 digit broker Point = 0.00001 and will print as zero.
string  PriceToStr(double p){ return( DoubleToStr(p, Digits) );
:
Print("Point=", PriceToStr(Point) );
 
saji:

guys:

my mt4 version is build 406, and the demo account is alpari company.

i used the predefined variable "point", and found that the value is 0, which is not real in the real trading situation.

i also export the value of "marketinfo(symbol(), mode_point)", which is also 0.

somebody say that the marketinfo function only works when the terminal is logged.

but i have already log the account, and it still return 0.

i also export other value of marketinfo, e.g mode_digits, which is correct.

can anybody explain for me?


saji

What are the codes? For eg. If you use vrb of data type int to store digits, you might get away, as you mentioned above. But if you use for Point, you will always have zero. Are you using double? i cant help you, really, without your codes.
 
WHRoeder:
Print defaults to 4 places. On a 5 digit broker Point = 0.00001 and will print as zero.

dear WHRoeder:

in my code, i use Alert for exporting.

is Alert defaults to 4 places?

 
diostar:
What are the codes? For eg. If you use vrb of data type int to store digits, you might get away, as you mentioned above. But if you use for Point, you will always have zero. Are you using double? i cant help you, really, without your codes.

dear diostar:

1、my code for exporting the Point and MODE_POINT is as below:

as you can see, i didn't use any variable to restore the data. just export them directly.....

Alert("Point = ", Point);
Alert("MarketInfo(Symbol(), MODE_POINT) = ", MarketInfo(Symbol(), MODE_POINT));

2、what is "vrb of data type"?

 
RaptorUK:
Don't you mean Point and MODE_POINT . . . yes, they are case sensitive.

what do you mean "case sensitive"?
 
saji:
is Alert defaults to 4 places?
https://docs.mql4.com/common/Alert "Data of double type output with 4 decimal digits after point. "
 
saji:

what do you mean "case sensitive"?

https://en.wikipedia.org/wiki/Case_sensitivity

point is not the same as Point, mode_point is not the same as MODE_POINT

 
saji:

dear diostar:

1、my code for exporting the Point and MODE_POINT is as below:

as you can see, i didn't use any variable to restore the data. just export them directly.....

2、what is "vrb of data type"?

Can you Print? instead of Alert.

data types: https://docs.mql4.com/basis/types

Reason: