Errors, bugs, questions - page 1674

 
Yousufkhodja Sultonov:
I'm sick of it already. Thank you, that's what I'll do, with this play appearing today.
Not today, that's for sure. Otherwise I wouldn't have had time to find a way to turn it off. That was long before ... when the forum was moving to the new engine? There was a warning about the move.
 
Meaningless issuance of a warning:
int val = 1;
if( (bool)val & 1 )
  Alert("sfdsf");
Warning: expression not boolean t_t_t.mq4 112 19

You can live with it, of course, but it's annoying. I've already made an explicit cast, and it won't stop.
 

pavlick_:

Your caste refers to val and the warning to the expression

 
Комбинатор:

Your caste refers to val, and the warning to the expression

Yes, that's right, thank you. That's how the complaint is silenced:

if( (bool)(val & 1) )

Sat for half an hour and couldn't figure out why

int val = B'10';
if( (bool)val & B'10' )
  Alert("sfdsf");
(I couldn't figure out why the alert didn't work here)).
 

Help can clarify that BarsCalculated returns the value returned by the OnCalculated indicator with the requested handle.

Is there any way to find out without custom events how many bars an indicator with such a handle has updated?

 
Is it possible that the size of the indicator buffer read via CopyBuffer is smaller than the number of bars?
 
Add a clarification to the help that if a value greater than rates_total is returned in OnCalculate, then on the next OnCalculate prev_calculated will be zero.
 
fxsaber:

Is there any way to find out how many bars the indicator has updated with that handle without custom events?

One solution.
 

MT4 b1010

The compiler doesn't swear at PlotIndexSetInteger. The function does not do what it does in MQL5.

 
fxsaber:

Didn't think about the situation where the indicator returns different values with the same parameters.

What will happen in this situation? A repeated iCustom of the indicator will give identical results? And if after that we make ChartIndicatorAdd to all of them?

No answer.

If I make an iCustom with the same contents from different places at different times, the corresponding indicator will be started only once (at the earliest iCustom)?

Reason: