Marketinfo() error?

 

Hi,

 I'm just doing some research about the MarketInfo function, and I just receive "0" (zero)

int start()
{

double tt=MarketInfo(NULL,MODE_TICKVALUE);
   Comment(
         "Tick Value     : ",tt+"\n"+
         "Tick Size      : ",MarketInfo(NULL,MODE_TICKSIZE)+"\n"+
         "lot  Size      : ",MarketInfo(NULL,MODE_LOTSIZE)+"\n"+
          "lot  Size      : ",MarketInfo(NULL,MODE_LOTSIZE)+"\n"+
         " ");
         
         
//----
   return(0);
}

all the values printed on chart are: 0.000000


Any Ideas?

Regards

 
psousa:

Hi,

 I'm just doing some research about the MarketInfo function, and I just receive "0" (zero)

all the values printed on chart are: 0.000000 

No they aren't  . . .   well not using the code you have posted.  They might be 0.0000 . . .  and that is easily explained by reading the documentation for the functions you are using.  Comment()

But . . .  why are you getting 0,  are you connected to your Broker ?  have you used some script to force the Spread to a set value ? 

 
RaptorUK:

No they aren't  . . .   well not using the code you have posted.  They might be 0.0000 . . .  and that is easily explained by reading the documentation for the functions you are using.  Comment()

But . . .  why are you getting 0,  are you connected to your Broker ?  have you used some script to force the Spread to a set value ? 


Sorry,

1-I allways used comment to print double variables :)

2-Yes I'm connected do the Broker

3-No, no scripts or anythinh else, just opened a chart and loaded the sample EA.

Any more ideas?

 

 
Replace NULL with Symbol()  ;-)
 
RaptorUK:
Replace NULL with Symbol()  ;-)


Yes!

it works now!

many thanks 

Reason: