Indicadores de elite :) - página 199

 

Filtros digitais EA info

Mladen, MrTools,

Os Filtros Digitais mostrados de #1987 a #1989 são muito impressionantes.

Eu gostaria de tentar um EA usando estes - você pode soletrar como configurar o iCustom para extrair os valores?

Uma boa escolha pode ser os Filtros Digitais na Carta Alisada - Modo 1 (SATL) e Modo 0 (FATL).

A lógica EA poderia ser simples - Comprar quando FATL > SATL e a inclinação de ambos for positiva; oposto para vender; fechar quando a inclinação FATL = 0.

Alguma recomendação sobre a melhor forma de calcular a inclinação aqui?

Obrigado!

Rex

 
mladen:
Rex

Para descobrir as encostas em versão não alisada, você pode usar algo como isto

int price = PRICE_CLOSE;

int filterType;

filterType = 0;

double fatlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double fatlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

filterType = 1;

double satlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double satlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

filterType = 2;

double rftlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double rftlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

filterType = 3;

double rstlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double rstlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

//

//

// slope of any of the values, fatl in this case

//

//

bool slopeUp = false;

bool slopeDown = false;

if (fatlCurrent>fatlPrevious) slopeUp = true;

if (fatlCurrent<fatlPrevious) slopeUp = true;

[/php]to find it out in the smoothed version use something like this (additional parameters needed in iCustom() call)

int length = 5;

int phase = 0

int price = PRICE_CLOSE;

int filterType;

filterType = 0;

double fatlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double fatlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

filterType = 1;

double satlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double satlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

filterType = 2;

double rftlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double rftlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

filterType = 3;

double rstlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double rstlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

//

//

// slope of any of the values, fatl in this case

//

//

bool slopeUp = false;

bool slopeDown = false;

if (fatlCurrent>fatlPrevious) slopeUp = true;

if (fatlCurrent<fatlPrevious) slopeUp = true;

[/php]Both examples are using current (open) bar value. To avoid it change the last parameter from 0 and 1 to 1 and 2. Also, included even unnecessary values calculations (as you can see all the digital filters types are calculated) in order to show how to retreive every value

To compare values of different filters simply compare (for example) if (fatlCurrent>rftlCurrent) or if (fatlCurrent<rftlCurrent) but that just shows their relative values. It does not show if they just crossed one above/bellow the other

______________________

To find crossings of a different filters, it gets a bit more complicated and the best way is to write a new indicator. It is more complicated because it depends how do you treat eventual equal values of two indicators. I prefer to treat them as a trend continuation and not as a possible trend reversal. Attaching an indicator that will show you "trends" (a simple "bigger"/ "smaller" relation) of 2 digital filters. To use it all you need is to check the value that is even not going to be displayed anywhere on chart, like this

[php] int price = PRICE_CLOSE;

int filterType1 = 0; // fatl

int filterType2 = 2; // rftl

int filtersTrendCurrent = iCustom(NULL,0,"Digital filters - on chart trend","",filterType1,FilterType2,price,5,0); // retrieve value from trend buffer

int filtersTrendPrevious = iCustom(NULL,0,"Digital filters - on chart trend","",filterType1,FilterType2,price,5,1); //

if (filterTrendCurrent!= filterTrendPrevious) // trend just changed

{

if (filtersTrendCurrent== 1) ....// trend changed to up

if (filtersTrendCurrent==-1) ....// trend changed to down

}

Also, the remark for a opened bar stands for this example too, so change the last parameter to desired value (1 for closed bar, for example) if you do not want to use opened bar signals. The target indicator is the histogram down on the picture (fatl / rftl crosses in this case on a 5 minute chart)
And in the end, you could do something like this :

[php] if (filterTrendCurrent!= filterTrendPrevious) // trend just changed

{

if ( fatlCurrent>fatlPrevious && rftlCurrent>rftlPrevious && filtersTrendCurrent== 1) Buy...

if ( fatlCurrent<fatlPrevious && eftlCurrent<rftlPrevious && filtersTrendCurrent==-1) Sell....

}

//

// the danger is that the slope and the crosses are not going to change in the same

// moment and buying or selling on every bar when slopes are equal would cause an

// EA to "overtrade"

//

Mas, em minha opinião, basta verificar as cruzes e usar alguma outra inclinação completamente diferente para a filtragem (nestes exemplos, são usados filtros digitais rápidos, depois filtros digitais lentos (satl ou rstl) poderiam ser usados como filtros de "inclinação").

______________________

PS: quando se trata de EA, você pode até considerar escrever um indicador que não exiba nenhum valor (nesse caso, economizaria 2 buffers nesta versão histo), mas nesse caso você tem que ter 101% de certeza do que está fazendo com o código (sem "controle visual")

cumprimentos

Mladen

Rex,

Só quero dizer que estes indicadores digitais da Mladen muito boa escolha para a Ea já notaram como eles são leves na Cpu em comparação com as outras versões antigas. Fizeram uma série de Ea;s com as versões digitais mais antigas, especialmente usando a inclinação STLM em múltiplos períodos de tempo que o computador estava sofrendo, estes parecem igualmente bons ou melhores, mas muito mais leves.

Cumprimentos

ferramentas

 

Mladen, Mrtools,

Isso é exatamente o que eu esperava!

Isto é uma grande ajuda.

Mais uma vez, obrigado.

Rex

 

Rex

Para descobrir as encostas em versão não alisada, você pode usar algo como isto

int price = PRICE_CLOSE;

int filterType;

filterType = 0;

double fatlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double fatlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

filterType = 1;

double satlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double satlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

filterType = 2;

double rftlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double rftlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

filterType = 3;

double rstlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double rstlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

//

//

// slope of any of the values, fatl in this case

//

//

bool slopeUp = false;

bool slopeDown = false;

if (fatlCurrent>fatlPrevious) slopeUp = true;

if (fatlCurrent<fatlPrevious) slopeUp = true;

[/php]to find it out in the smoothed version use something like this (additional parameters needed in iCustom() call)

int length = 5;

int phase = 0

int price = PRICE_CLOSE;

int filterType;

filterType = 0;

double fatlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double fatlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

filterType = 1;

double satlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double satlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

filterType = 2;

double rftlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double rftlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

filterType = 3;

double rstlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double rstlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

//

//

// slope of any of the values, fatl in this case

//

//

bool slopeUp = false;

bool slopeDown = false;

if (fatlCurrent>fatlPrevious) slopeUp = true;

if (fatlCurrent<fatlPrevious) slopeUp = true;

[/php]Both examples are using current (open) bar value. To avoid it change the last parameter from 0 and 1 to 1 and 2. Also, included even unnecessary values calculations (as you can see all the digital filters types are calculated) in order to show how to retreive every value

To compare values of different filters simply compare (for example) if (fatlCurrent>rftlCurrent) or if (fatlCurrent<rftlCurrent) but that just shows their relative values. It does not show if they just crossed one above/bellow the other

______________________

To find crossings of a different filters, it gets a bit more complicated and the best way is to write a new indicator. It is more complicated because it depends how do you treat eventual equal values of two indicators. I prefer to treat them as a trend continuation and not as a possible trend reversal. Attaching an indicator that will show you "trends" (a simple "bigger"/ "smaller" relation) of 2 digital filters. To use it all you need is to check the value that is even not going to be displayed anywhere on chart, like this

[php] int price = PRICE_CLOSE;

int filterType1 = 0; // fatl

int filterType2 = 2; // rftl

int filtersTrendCurrent = iCustom(NULL,0,"Digital filters - on chart trend","",filterType1,FilterType2,price,5,0); // retrieve value from trend buffer

int filtersTrendPrevious = iCustom(NULL,0,"Digital filters - on chart trend","",filterType1,FilterType2,price,5,1); //

if (filterTrendCurrent!= filterTrendPrevious) // trend just changed

{

if (filtersTrendCurrent== 1) ....// trend changed to up

if (filtersTrendCurrent==-1) ....// trend changed to down

}

Also, the remark for a opened bar stands for this example too, so change the last parameter to desired value (1 for closed bar, for example) if you do not want to use opened bar signals. The target indicator is the histogram down on the picture (fatl / rftl crosses in this case on a 5 minute chart)
And in the end, you could do something like this :

[php] if (filterTrendCurrent!= filterTrendPrevious) // trend just changed

{

if ( fatlCurrent>fatlPrevious && rftlCurrent>rftlPrevious && filtersTrendCurrent== 1) Buy...

if ( fatlCurrent<fatlPrevious && eftlCurrent<rftlPrevious && filtersTrendCurrent==-1) Sell....

}

//

// the danger is that the slope and the crosses are not going to change in the same

// moment and buying or selling on every bar when slopes are equal would cause an

// EA to "overtrade"

//

Mas, em minha opinião, basta verificar as cruzes e usar alguma outra inclinação completamente diferente para a filtragem (nestes exemplos são usados filtros digitais rápidos, depois filtros digitais lentos (satl ou rstl) poderiam ser usados como filtros de "inclinação")

______________________

PS: quando se trata de EA, você pode até considerar escrever um indicador que não exiba nenhum valor (nesse caso, economizaria 2 buffers nesta versão histo), mas nesse caso você tem que ter 101% de certeza do que está fazendo com o código (sem "controle visual")

______________________

PPS: o indicador "digital filters - on chart trends" correto pode ser encontrado neste post

cumprimentos

Mladen

rdoane:
Mladen, MrTools,

Os Filtros Digitais mostrados de #1987 a #1989 são muito impressionantes.

Gostaria de tentar um EA usando estes - você pode explicar como configurar o iCustom para extrair os valores?

Uma boa escolha pode ser os Filtros Digitais na Carta Alisada - Modo 1 (SATL) e Modo 0 (FATL).

A lógica EA poderia ser simples - Comprar quando FATL > SATL e a inclinação de ambos é positiva; oposto para vender; fechar quando a inclinação FATL = 0.

Alguma recomendação sobre a melhor forma de calcular a inclinação aqui?

Obrigado!

Rex
Arquivos anexados:
 

No "digital filters - on chart trends" publicado originalmente neste post: https: //www.mql5.com/en/forum/general houve um erro. Este é o corrigido, portanto, por favor use este

cumprimentos

Mladen

Arquivos anexados:
 

Mladen,

Você pode adicionar corante não-repintura e opção mtf a este indicador? Obrigado.

Arquivos anexados:
rsi_ma.mq4  4 kb
 

Pc-breakout

Mladen,

Estou usando um EA em um servidor privado virtual. Às vezes tenho a mensagem "PC-Breakout", quando coloco o mouse sobre o número do bilhete.

O que isso significa? É uma perda de conexão ou pode ser um reinício do servidor?

obrigado

cumprimentos,

 
casaliss:
Oi mladen

Favor adicionar setas cruzadas de linha zero no gráfico atual.

Obrigado

Olá Mladen

Pós 1997

Obrigado

 

Tradefx1

Meu palpite é que é o comentário que sua EA está colocando no pedido (tente checar "comentários" também quando você clicar com o botão direito do mouse na lista de pedidos e depois veja se o comentário corresponde ao texto pop-up que você está recebendo)

cumprimentos

Mladen

Tradefx1:
Mladen,

Estou usando um EA em um servidor privado virtual. Às vezes tenho a mensagem "PC-Breakout", quando coloco o mouse sobre o número do bilhete.

O que isso significa? É uma perda de conexão ou pode ser um reinício do servidor?

obrigado

cumprimentos,
 

biddick

Aqui você vai
PS: ignorou a parte "mtf". Anexou também uma versão "mtf".

cumprimentos

Mladen

biddick:
Mladen, você pode adicionar corante não-repintura e opção mtf a este indicador? Obrigado.
Arquivos anexados:
Razão: