Файл Math.mqh нужно положить в папку terminal_data_folder\MQL5\Include\Math\Stat\.
Не компилируется под MT4. #property strict не помогает
'Math.mqh' Math.mqh 1 1 'MathLog1p' - no one of the overloads can be applied to the function call Math.mqh 4655 17 'MathLog1p' - no one of the overloads can be applied to the function call Math.mqh 4676 16 'MathExpm1' - no one of the overloads can be applied to the function call Math.mqh 4702 17 'MathExpm1' - no one of the overloads can be applied to the function call Math.mqh 4723 16 'MathSinh' - no one of the overloads can be applied to the function call Math.mqh 4750 17 'MathSinh' - no one of the overloads can be applied to the function call Math.mqh 4772 16 'MathCosh' - no one of the overloads can be applied to the function call Math.mqh 4799 17 'MathCosh' - no one of the overloads can be applied to the function call Math.mqh 4821 16 'MathTanh' - no one of the overloads can be applied to the function call Math.mqh 4848 17 'MathTanh' - no one of the overloads can be applied to the function call Math.mqh 4870 16 'MathArcsinh' - no one of the overloads can be applied to the function call Math.mqh 4897 17 'MathArcsinh' - no one of the overloads can be applied to the function call Math.mqh 4919 16 'MathArccosh' - no one of the overloads can be applied to the function call Math.mqh 4946 17 'MathArccosh' - no one of the overloads can be applied to the function call Math.mqh 4968 16 'MathArctanh' - no one of the overloads can be applied to the function call Math.mqh 4995 17 'MathArctanh' - no one of the overloads can be applied to the function call Math.mqh 5017 16 16 error(s), 0 warning(s) 17 1
fxsaber: Но пашет на 99% в MQL4, как и GraphPlot. Было бы 100%, если бы исправили баг в MQL4 - no one of the overloads can be applied to the function call.
Посмотрел внимательно, а это не баг MQL4, а баг MQL5!
//+------------------------------------------------------------------+ //| MathLog1p | //+------------------------------------------------------------------+ //| The function calculates log(1+x) for the elements from the array.| //| | //| Arguments: | //| array[] : Array with values | //| result[] : Output array with calculated values | //| | //| Return value: true if successful, otherwise false | //+------------------------------------------------------------------+ bool MathLog1p(constdouble &array[],double &result[]) { int size=ArraySize(array); if(size==0) return(false); //--- prepare target array if(ArraySize(result)<size) if(ArrayResize(result,size)!=size) return(false); //--- calculate values for(int i=0; i<size; i++) result[i]=MathLog1p(array[i]); //--- return(true); } //+------------------------------------------------------------------+ //| MathLog1p | //+------------------------------------------------------------------+ //| The function calculates log(1+x) for the elements from the array.| //| | //| Arguments: | //| array[] : Array with values | //| | //| Return value: true if successful, otherwise false | //+------------------------------------------------------------------+ bool MathLog1p(double &array[]) { int size=ArraySize(array); if(size==0) return(false); //--- calculate values for(int i=0; i<size; i++) array[i]=MathLog1p(array[i]); //--- return(true); }
MQL4 правильно ругается - no one of the overloads can be applied to the function call. А MQL5 молчит при явной ошибке. @Renat Fatkhullin, баг?
Форум по трейдингу, автоматическим торговым системам и тестированию торговых стратегий
Помогите с корреляцией
Quantum, 2016.12.01 12:53
Файл Math.mqh нужно положить в папку terminal_data_folder\MQL5\Include\Math\Stat\.Не компилируется под MT4. #property strict не помогает
'MathLog1p' - no one of the overloads can be applied to the function call Math.mqh 4655 17
'MathLog1p' - no one of the overloads can be applied to the function call Math.mqh 4676 16
'MathExpm1' - no one of the overloads can be applied to the function call Math.mqh 4702 17
'MathExpm1' - no one of the overloads can be applied to the function call Math.mqh 4723 16
'MathSinh' - no one of the overloads can be applied to the function call Math.mqh 4750 17
'MathSinh' - no one of the overloads can be applied to the function call Math.mqh 4772 16
'MathCosh' - no one of the overloads can be applied to the function call Math.mqh 4799 17
'MathCosh' - no one of the overloads can be applied to the function call Math.mqh 4821 16
'MathTanh' - no one of the overloads can be applied to the function call Math.mqh 4848 17
'MathTanh' - no one of the overloads can be applied to the function call Math.mqh 4870 16
'MathArcsinh' - no one of the overloads can be applied to the function call Math.mqh 4897 17
'MathArcsinh' - no one of the overloads can be applied to the function call Math.mqh 4919 16
'MathArccosh' - no one of the overloads can be applied to the function call Math.mqh 4946 17
'MathArccosh' - no one of the overloads can be applied to the function call Math.mqh 4968 16
'MathArctanh' - no one of the overloads can be applied to the function call Math.mqh 4995 17
'MathArctanh' - no one of the overloads can be applied to the function call Math.mqh 5017 16
16 error(s), 0 warning(s) 17 1
Это MQL5 библиотека без поддержки MQL4.
Классы в этой мат библиотеке не нужны.
Это MQL5 библиотека без поддержки MQL4.
Но пашет на 99% в MQL4, как и GraphPlot. Было бы 100%, если бы исправили баг в MQL4 - no one of the overloads can be applied to the function call.
Посмотрел внимательно, а это не баг MQL4, а баг MQL5!
//| MathLog1p |
//+------------------------------------------------------------------+
//| The function calculates log(1+x) for the elements from the array.|
//| |
//| Arguments: |
//| array[] : Array with values |
//| result[] : Output array with calculated values |
//| |
//| Return value: true if successful, otherwise false |
//+------------------------------------------------------------------+
bool MathLog1p(const double &array[],double &result[])
{
int size=ArraySize(array);
if(size==0)
return(false);
//--- prepare target array
if(ArraySize(result)<size)
if(ArrayResize(result,size)!=size)
return(false);
//--- calculate values
for(int i=0; i<size; i++)
result[i]=MathLog1p(array[i]);
//---
return(true);
}
//+------------------------------------------------------------------+
//| MathLog1p |
//+------------------------------------------------------------------+
//| The function calculates log(1+x) for the elements from the array.|
//| |
//| Arguments: |
//| array[] : Array with values |
//| |
//| Return value: true if successful, otherwise false |
//+------------------------------------------------------------------+
bool MathLog1p(double &array[])
{
int size=ArraySize(array);
if(size==0)
return(false);
//--- calculate values
for(int i=0; i<size; i++)
array[i]=MathLog1p(array[i]);
//---
return(true);
}
MQL4 правильно ругается - no one of the overloads can be applied to the function call. А MQL5 молчит при явной ошибке. @Renat Fatkhullin, баг?
MQL4 правильно ругается - no one of the overloads can be applied to the function call. А MQL5 молчит при явной ошибке.
Это не ошибка. В MQL5 эти функции есть.
Это не ошибка. В MQL5 эти функции есть.
Здравствуйте,
столкнулся с проблемой при вычислении квантиля гамма-распределения
в R:
> qgamma(0.05,2,scale=1)
[1] 0.3553615
> qgamma(0.05,10,scale=1)
[1] 5.425406
в mql5:
результаты:
0.3553615106986621
Error 4
build 1596
Здравствуйте,
столкнулся с проблемой при вычислении квантиля гамма-распределения
Добрый день, спасибо за сообщение.
Ошибка 4 означает проблемы со сходимостью в алгоритме обратных итераций Ньютона, который используется для нахождения квантилей. Будем разбираться.