quick question on MODE_POINT

 

Just had a noob question that I'm sure has been asked a hundred times over. Nevertheless, I am asking it again hoping someone can just answer.

I'm using the

MarketInfo("USDJPY", MODE_POINT);

function, and my broker, IBFX, is a 3/5 decimal broker. I tried to use a

Comment(Point); 

and also:  

Comment(MarketInfo(NULL, MODE_POINT));

to find out, but it returned 0 in all cases.

So hopefully someone knowledgeable can answer this simple question:

Should "MODE_POINT" in this application return .001 or .01 ?

 
Comment(MarketInfo("USDJPY", MODE_POINT));
0.001
 
qjol:
0.001


I just tried to add the Comment in the init() part of my EA, and it makes no difference. In fact, it makes no difference where I put it, I still get a "0" no matter what smbol I'm using?

Do you know why this is? Thanks.

 
outofdebt:

I just tried to add the Comment in the init() part of my EA, and it makes no difference. In fact, it makes no difference where I put it, I still get a "0" no matter what smbol I'm using?

Do you know why this is? Thanks.

Two related possibilities spring to mind: (a) you are using an IBFX Mini account where the correct symbol name is USDJPYm rather than USDJPY, or (b) USDJPY is not in the Market Watch.

(If this were on a symbol quoted to 5DP rather than 3DP, then you could also be encountering the issue that the Comment() and Print() functions only output double values to 4DP, and you have to use DoubleToStr() if you want more than this.)

 
outofdebt:
to find out, but it returned 0 in all cases.
No they did not. Comment/Print/Alert defaults to 4 decimal places, so on a 5 digit broker it printed zero. Try:
Comment( PriceToStr(Point) ); 
:
string  PriceToStr(double p){ return( DoubleToStr(p, Digits) ); }
 
WHRoeder:
No they did not. Comment/Print/Alert defaults to 4 decimal places, so on a 5 digit broker it printed zero. Try:

He's giving USDJPY as an example. If that's really the example he's using, then the 4DP limit on Comment() etc can't be the only issue.
Reason: