Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 825

 
What conclusion should I make after looking at the link - thatMetaQuotes is scoring on mt4 or can I ask about mt4 in the mt5 forum?
 

Comment(NormalizeDouble(MarketInfo(Symbol(),MODE_STOPLEVEL),Digits)); Why does the message appear - 0.0 . ???

And I want to get a specific number. What's wrong?

 
Valerius:

Comment(NormalizeDouble(MarketInfo(Symbol(),MODE_STOPLEVEL),Digits)); Why does the message appear - 0.0 . ???

And I want to get a specific number. What's wrong?


I think normalization is unnecessary, MODE_STOPLEVEL returns a value in points, if I'm not mistaken. Translate the function into a variable of string type and put it in the comment.
 
Valerius:

Comment(NormalizeDouble(MarketInfo(Symbol(),MODE_STOPLEVEL),Digits)); Why does the message - 0.0 . ???

And I want to get a specific number. What's wrong?

StopLevel sets the server! So, 0 in digits, like many people, me too!

Comment(MarketInfo(Symbol(),MODE_STOPLEVEL)); or Comment(NormalizeDouble(MarketInfo(Symbol(),MODE_STOPLEVEL)*Point,Digits));

 

MODE_TICKVALUE started to return only zero. before it was working fine, i am puzzled. who can tell me what? can it be a glitch of the trader and not the expert?


double  value =MarketInfo(symbol, MODE_TICKVALUE);


 
pycha:

MODE_TICKVALUE started to return only zero. before it was working fine, i am puzzled. who can tell me what can it be a glitch of the trader and not the expert?


double  value =MarketInfo(symbol, MODE_TICKVALUE);



Wait for the first tick, there will be a result!
 

I'm confused. the program has been upgraded in some places, but it's unlikely that data processing has somehow started to affect market data. and how to work on sundays and sundays? ticks do not come. and my Expert Advisor crashes - division by zero

 
pycha:

I'm confused. the program has been upgraded in some places, but it's unlikely that data processing has somehow started to affect market data. and how to work on sundays and sundays? ticks do not come. and my Expert Advisor crashes - division by zero


Put a condition before query that it is greater than zero and at the beginning of OnTick() !
 

I don't know why it would do that if it worked correctly before.

There are older versions of EA where MODE_TICKVALUE did not exactly return zero but the correct value. now it returns zero. it seems to be something with the terminal. who can tell me how to fix it?

 
I commented out everything in OnInit and put it in OnTick

double  value =MarketInfo(symbol, MODE_TICKVALUE);


it still returned zero.
Reason: