Errors, bugs, questions - page 3046

 
Similar to the previous error, but there is a fundamental difference
class A {};
template<typename T>
void f( T, T const ) {}
void OnStart()
{
    const A *a;
    f( a, a ); //Error: 'a' - cannot convert from const pointer to nonconst pointer
}
because the formal substitution compiles without errors
 
Fast235:

It's like you're just looking for bugs and that's all you're interested in.

do you have to use it all, in windows 2022 classes you build here

I suggest that suchtelepathsbe bannedfor a month
 
A100:

You have reason to be banned - for meaningless angry posts

I admit I was wrong, perhaps all your class faults can cause problems

I'm deleting the messages.

 
it's a feature
 
Sunriser:
https://www.mql5.com/ru/forum/371894 Is this a bug?

This is not a bug.

Use #property tester_everytick_calculate

 

information

Slav, please update the guide more often
Sometimes it is purely intuitive or trial and error to figure out new features or language conditions

 
Спартак Угланов:

information

Slav, please update directory more often
sometimes by pure intuition or trial and error we can figure out new features or language conditions

Yes, we need a mention of #property tester_everytick_calculate in the section about OnCalculate() in the manual


This directive is not present in built-in indicators and you cannot manage this feature when connecting the indicator, you just re-save the code under a different name,

and it seems that there is no source code for built-in iMA.

 
Sunriser:

Yes, in the manual in the OnCalculate() section there is a reference to #property tester_everytick_calculate


And this directive is not present in built-in indicators and you can not manage this feature when connecting the indicator, you just re-save the code under a different name,

and it seems there is no source code for the built-in iMA.

The built-in ones don't need it. All the custom indicators are analogues of the built-in indicators, they are calculated on the next call.

This is for exotic cases when you need to call OnCalculate on every tick

PS "There seems to be no source code"... Examples\Custom Moving Averages.mq5. Also look at using MovingAverages.mqh in example indicators

 
Good afternoon. Help. SymbolSelect andSymbolExist work differently?

Print(SymbolSelect(" EURUSD",true)); I get an error - true
Print(SymbolExist("EURUSD",false)); I get an error - 'true' - variable expected

Reason: