Ti stai perdendo delle opportunità di trading:
- App di trading gratuite
- Oltre 8.000 segnali per il copy trading
- Notizie economiche per esplorare i mercati finanziari
Registrazione
Accedi
Accetti la politica del sito e le condizioni d’uso
Se non hai un account, registrati
Filtri digitali EA info
Mladen, MrTools,
I filtri digitali mostrati in #1987 a #1989 sono molto impressionanti.
Mi piacerebbe provare un EA che li utilizzi - puoi spiegare come impostare iCustom per estrarre i valori?
Una buona scelta potrebbe essere i filtri digitali su Chart Smoothed - Mode 1 (SATL) e Mode 0 (FATL).
La logica dell'EA potrebbe essere semplice - Comprare quando FATL > SATL e la pendenza di entrambi è positiva; opposto per vendere; chiudere quando la pendenza di FATL = 0.
Qualche raccomandazione su come calcolare al meglio la pendenza qui?
Grazie!
Rex
Rex
Per trovare le pendenze nella versione non lisciata si può usare qualcosa come questo
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 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
}
[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"
//
Ma secondo me è sufficiente controllare gli incroci e usare qualche pendenza completamente diversa per il filtraggio (in questo esempio si usano filtri digitali veloci, poi i filtri digitali lenti (satl o rstl) potrebbero essere usati come filtri "slope")
______________________
PS: quando si tratta di EA, si potrebbe anche considerare di scrivere un indicatore che non visualizza alcun valore (in questo caso si risparmierebbero 2 buffer in questa versione histo) ma in questo caso bisogna essere sicuri al 101% di cosa si sta facendo con il codice (nessun "controllo visivo")
saluti
MladenRex,
Voglio solo dire questi indicatori digitali da Mladen molto buona scelta per Ea sono tutti pronti notato come la luce su Cpu sono rispetto alle altre vecchie versioni. Ho fatto un certo numero di Ea; s con le vecchie versioni digitali soprattutto utilizzando STLM pendenza su più timeframes uomo il computer stava soffrendo, questi sembrano altrettanto buono o meglio ma molto più leggero.
Saluti
strumenti
Mladen, Mrtools,
Questo è esattamente quello che speravo!
Questo è un grande aiuto.
Grazie ancora.
Rex
Rex
Per trovare le pendenze nella versione non lisciata puoi usare qualcosa come questo
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 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
}
[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"
//
Ma secondo me è sufficiente controllare gli incroci e usare qualche pendenza completamente diversa per il filtraggio (in questo esempio si usano filtri digitali veloci, poi i filtri digitali lenti (satl o rstl) potrebbero essere usati come filtri "slope")
______________________
PS: quando si tratta di EA, si potrebbe anche considerare di scrivere un indicatore che non visualizza alcun valore (in questo caso si risparmierebbero 2 buffer in questa versione histo) ma in questo caso bisogna essere sicuri al 101% di cosa si sta facendo con il codice (nessun "controllo visivo")
______________________
PPS: l'indicatore corretto "digital filters - on chart trends" si trova a questo post https://www.mql5.com/en/forum/general
saluti
Mladen
Mladen, MrTools,
I filtri digitali mostrati in #1987 a #1989 sono molto impressionanti.
Mi piacerebbe provare un EA che li utilizzi - puoi spiegarmi come impostare iCustom per estrarre i valori?
Una buona scelta potrebbe essere i filtri digitali su Chart Smoothed - Mode 1 (SATL) e Mode 0 (FATL).
La logica dell'EA potrebbe essere semplice - Comprare quando FATL > SATL e la pendenza di entrambi è positiva; opposto per vendere; chiudere quando la pendenza di FATL = 0.
Qualche raccomandazione su come calcolare al meglio la pendenza qui?
Grazie!
RexNei "filtri digitali - sulle tendenze dei grafici" originariamente inviati a questo post: https: //www.mql5.com/en/forum/general c'era un errore. Questo è quello corretto, quindi per favore usate questo
saluti
Mladen
Mladen,
Puoi aggiungere la colorazione non ridipinta e l'opzione mtf a questo indicatore? Grazie.
Pc-breakout
Mladen,
Sto usando un EA su un server privato virtuale. Ho a volte il messaggio "PC-Breakout", quando metto il mouse sul numero del biglietto.
Che cosa significa? È una perdita di connessione o può essere un riavvio del server?
grazie
saluti,
Ciao mladen
Si prega di aggiungere le frecce a croce della linea zero sul grafico attuale.
GrazieCiao Mladen
Posta 1997
Grazie
Tradefx1
La mia ipotesi è che sia il commento che il tuo EA sta mettendo sull'ordine (prova a controllare anche "commenti" quando fai clic destro nella lista degli ordini e poi vedi se il commento corrisponde al testo pop-up che stai ottenendo)
saluti
Mladen
Mladen,
Sto usando un EA su un server privato virtuale. Ho a volte il messaggio "PC-Breakout", quando metto il mouse sul numero del ticket.
Che cosa significa? È una perdita di connessione o può essere un riavvio del server?
grazie
saluti,biddick
Ecco a te PS: trascurato la parte "mtf". Ho allegato anche una versione mtfsaluti
Mladen
Mladen, puoi aggiungere la colorazione non ridipinta e l'opzione mtf a questo indicatore? Grazie.