Errors, bugs, questions - page 1689

 
Vladislav Andruschenko:
Greetings. Nduk on android.
Android flipper version 6.xxx
I get this error when I send messages to my email account

Hello!

The bug will be fixed shortly. Thank you for your feedback.

 
Sergei Vladimirov:

And it doesn't compile in MKL:

Given MQL features (objects are passed by reference only; typename - returns string)
template<typename T>
void Func(T t1, T t2 = NULL)  
covers all possible cases (except: can't specify default parameter type). If not, give an example
 

A100:
С учетом особенностей MQL (objects are passed by reference only; typename - возвращает строку)

Covers all possible cases (except: Can't specify default parameter type). If not, give an example

template<typename T>
void Func(T t1, T t2 = NULL)
{
        Print("t1: ", t1, " t2: ", t2);
}

void OnStart()
{
        Func(1);   // 'Func' - cannot to apply function template
}

But I didn't take into account that objects are only passed to the function by reference.

 
Sergei Vladimirov:

// 'Func' - cannot to apply function template

This error may be caused by build < 1375. In 1430 it is definitely already fixed.
 
A100:
The error could be a build < 1375. In 1430 it's already fixed for sure
Whoops. I did all this in four, the editor version is 1395. And in five, the 1430 editor does work, thanks for the tip.

Will the meta editor be updated in four in the foreseeable future?
 

What spread values does theCopySpread() function producefor the corresponding chart period?

It is not clear whether it is the average, minimum or maximum, and the help of the function does not say anything about it.

 
Sergei Vladimirov:
Whoops. I did all this in four, the editor version is 1395. And in five, the 1430 editor does work, thanks for the tip.

Will the meta-editor be updated in four in the foreseeable future?
And you open your mq4 in the 1430 editor and compile it into ex4.
 
fxsaber:
And you open your mq4 in the 1430 editor and compile it into ex4.
I did so. But: a) it's impossible to start debugging, b) when you give the work to customer together with sources, everything should compile for him without tambourine.
 

I can't understand, this number is saved to a file

179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,00

double            m_profit_factor;         // 27) прибыльность


m_profit_factor=TesterStatistics(STAT_PROFIT_FACTOR);

double ProfitFactor(void) const {return m_profit_factor;};

FormatDelimiter(DoubleToString(this.ProfitFactor(),2))+delimiter+ //преобразуем в строковый параметр для записи в файл

code approximate - not mine - made a freelancer and refused further support, so I can not understand how to correct.

The situation arises if there is a profit, but no loss, it turns out the division by zero, but it should not be solved by such an atrocious number in the standard function.... no?

 
-Aleks-:

I can't understand, this number is saved to a file

179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,00

double            m_profit_factor;         // 27) прибыльность


m_profit_factor=TesterStatistics(STAT_PROFIT_FACTOR);

double ProfitFactor(void) const {return m_profit_factor;};

FormatDelimiter(DoubleToString(this.ProfitFactor(),2))+delimiter+ //преобразуем в строковый параметр для записи в файл

code approximate - not mine - made a freelancer and refused further support, so I can not understand how to correct.

The situation arises if there is a profit, but no loss, it turns out the division by zero, but it should not be solved by such an atrocious number in the standard function.... no?

#define  MNOGO 123

FormatDelimiter(DoubleToString(MathMin(this.ProfitFactor(), MNOGO),2))+delimiter+ //преобразуем в строковый параметр для записи в файл
Reason: