Discussão do artigo "Distribuições estatísticas no MQL5 - tirando o melhor de R" - página 14
Você está perdendo oportunidades de negociação:
- Aplicativos de negociação gratuitos
- 8 000+ sinais para cópia
- Notícias econômicas para análise dos mercados financeiros
Registro
Login
Você concorda com a política do site e com os termos de uso
Se você não tem uma conta, por favor registre-se
Fórum sobre negociação, sistemas de negociação automatizados e teste de estratégias de negociação
Ajuda com correlação
Quantum, 2016.12.01 12:53 pm.
O arquivo Math.mqh deve ser colocado na pasta terminal_data_folder\MQL5\Include\Math\Stat\.Ele não é compilado no MT4. #property strict não ajuda
'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
Esta é uma biblioteca MQL5 sem suporte para MQL4.
As classes não são necessárias nessa biblioteca de matriz.
Esta é uma biblioteca MQL5 sem suporte a MQL4.
Mas ele funciona 99% em MQL4, assim como o GraphPlot. Seria 100% se eles corrigissem o erro no MQL4 - nenhuma das sobrecargas pode ser aplicada à chamada de função.
Eu olhei com cuidado, mas isso não é um erro do MQL4, mas um erro do MQL5!
//| MathLog1p|
//+------------------------------------------------------------------+
//| A função calcula log(1+x) para os elementos da matriz.
//||
//| Argumentos:|
//| matriz[] : Matriz com valores|
//| result[] : Matriz de saída com valores calculados
//||
//| Valor de retorno: verdadeiro se for bem-sucedido, caso contrário, falso
//+------------------------------------------------------------------+
bool MathLog1p(const double &array[],double &result[])
{
int size=ArraySize(array);
if(size==0)
return(false);
//--- preparar a matriz de destino
if(ArraySize(result)<size)
if(ArrayResize(result,size)!=size)
return(false);
//--- calcular valores
for(int i=0; i<size; i++)
result[i]=MathLog1p(array[i]);
//---
return(true);
}
//+------------------------------------------------------------------+
//| MathLog1p|
//+------------------------------------------------------------------+
//| A função calcula log(1+x) para os elementos da matriz.
//||
//| Argumentos:|
//| matriz[] : Matriz com valores|
//||
//| Valor de retorno: verdadeiro se for bem-sucedido, caso contrário, falso
//+------------------------------------------------------------------+
bool MathLog1p(double &array[])
{
int size=ArraySize(array);
if(size==0)
return(false);
//--- calcular valores
for(int i=0; i<size; i++)
array[i]=MathLog1p(array[i]);
//---
return(true);
}
A MQL4 fala corretamente - nenhuma das sobrecargas pode ser aplicada à chamada defunção. Mas o MQL5 fica em silêncio quando há um erro óbvio. @Renat Fatkhullin, um bug?
A MQL4 avisa corretamente - nenhuma das sobrecargas pode ser aplicada à chamada defunção. E a MQL5 é silenciosa quando há um erro óbvio.
Isso não é um erro. A MQL5 tem essas funções.
Isso não é um erro. A MQL5 tem essas funções.
Olá,
encontrei um problema ao calcular o quantil da distribuição gama
em R:
> qgamma(0.05,2,scale=1)
[1] 0.3553615
> qgamma(0.05,10,scale=1)
[1] 5.425406
em mql5:
Resultados:
0.3553615106986621
Erro 4
build 1596
Olá,
encontrou um problema ao calcular o quantil da distribuição gama
Boa tarde, obrigado por sua mensagem.
O erro 4 significa problemas de convergência no algoritmo de iteração inversa de Newton, que é usado para encontrar os quantis. Daremos uma olhada no problema.