TickSize = 0 ???

 

OK Here's my problem:

I create a double on the global scope called   TickSize

Then in the Oninit function I put...   TickSize = MarketInfo(Symbol(),MODE_TICKSIZE); 

The EA complains that this is zero and it is messing with the division. I print it and sure enough it is    0   No Decimal points just    0

 MarketInfo(Symbol(),MODE_TICKSIZE)*1000000  is worth 10 strangely enough!

I have tried Normalizing it ,but no matter what I do, it is just 0. Apart from assuming it is 0.00001 and hardcoding it, how do I get to 0.00001 ?

Any help would be much appreciated right now.

 
BambooDrum:

OK Here's my problem:

I create a double on the global scope called   TickSize

Then in the Oninit function I put...   TickSize = MarketInfo(Symbol(),MODE_TICKSIZE); 

The EA complains that this is zero and it is messing with the division. I print it and sure enough it is    0   No Decimal points just    0

 MarketInfo(Symbol(),MODE_TICKSIZE)*1000000  is worth 10 strangely enough!

I have tried Normalizing it ,but no matter what I do, it is just 0. Apart from assuming it is 0.00001 and hardcoding it, how do I get to 0.00001 ?

Any help would be much appreciated right now.

Actually I can write TickSize = 0.00001; and even this is said to be 0 with a print statement on the next line.   Yes, Ticksize definitely is a double and the start function is virtually all Commented out.

Are small numbers not allowed? 

 
BambooDrum:

Actually I can write TickSize = 0.00001; and even this is said to be 0 with a print statement on the next line.   Yes, Ticksize definitely is a double and the start function is virtually all Commented out.

Are small numbers not allowed? 

Show your code.
 
angevoyageur:
Show your code.

Thanks angevoyageur 

Well this is embarrassing. I think (not sure now) what happened, is that an integer was made out of a double after a bit of multiplication and what not . But it all works now anyway.

Not to worry Perhaps now we have a thread that is a bit useless though - Oops