Come codificare? - pagina 209

 

Ciao a tutti...

qualcuno può mostrarmi come iniziare a codificare indicatori e EA

 
kessing:
Ciao a tutti... qualcuno può mostrarmi come iniziare a codificare indicatori e EA

Ciao,

Guarda qui: https://www.mql5.com/en/forum/172969/page2

 
kessing:
Ciao a tutti... qualcuno può mostrarmi come iniziare a codificare indicatori e EA

Leggete questo thread (primo post): https://www.mql5.com/en/forum/178706

e questo thread: https://www.mql5.com/en/forum/173290

 
kessing:
Ciao a tutti... qualcuno può mostrarmi come iniziare a codificare indicatori e EA

Ci sono molte informazioni sia qui che su FF. Puoi anche fare una ricerca su Google.

Per una facile introduzione alla programmazione EA guardate il link nella mia sig. È un buon punto di partenza per un programmatore principiante.

Buona fortuna!

Lux

 
 

Indicatore a EA

Ciao a tutti,

Vorrei chiedere aiuto a chiunque possa realizzare l'EA del Waddah Attar Explosion allegato.

Non vedo l'ora di sentire la risposta.

Grazie.

-s-

 

ea universale Ma 2 croce

Ciao gente!

sto cercando di modificare questo ea di firedave (da questo forum)

l'ea si chiama "universal ma cross ea"

quello che voglio creare è un ea che entra su 2 cross confermati (per esempio una coppia di ema 2 & 4 e un'altra coppia di ema 5 & 20)

Questo è il codice principale, cosa dovrei fare?

//----------------------- IMPOSTA IL VALORE DELLA VARIABILE

if(ConfirmedOnEntry==true)

{

if(CheckTime==iTime(NULL,TimeFrame,0)) return(0); else CheckTime = iTime(NULL,TimeFrame,0);

FastMACurrent = iMA(NULL,TimeFrame,FastMAPeriod,FastMAshift,FastMAType,FastMAPrice,1);

SlowMACurrent = iMA(NULL,TimeFrame,SlowMAPeriod,SlowMAshift,SlowMAType,SlowMAPrice,1);

}

else

{

FastMACurrent = iMA(NULL,TimeFrame,FastMAPeriod,FastMAshift,FastMAType,FastMAPrice,0);

SlowMACurrent = iMA(NULL,TimeFrame,SlowMAPeriod,SlowMAshift,SlowMAType,SlowMAPrice,0);

}

CrossDirection = subCrossDirection(FastMACurrent,SlowMACurrent);

Ho provato di tutto, ma non trovo una soluzione... per favore aiutatemi per la salute di questa comunità , voglio qualcosa di simile a questo:

//----------------------- VALORE IMPOSTATO PER LA VARIABILE

if(ConfirmedOnEntry==true)

{

if(CheckTime==iTime(NULL,TimeFrame,0)) return(0); else CheckTime = iTime(NULL,TimeFrame,0);

FastMACurrent = iMA(NULL,TimeFrame,2,FastMAshift,FastMAType,FastMAPrice,1);

SlowMACurrent = iMA(NULL,TimeFrame,4,SlowMAshift,SlowMAType,SlowMAPrice,1);

FastMACurrent2 = iMA(NULL,TimeFrame,5,FastMAshift,FastMAType,FastMAPrice,1);

SlowMACurrent2 = iMA(NULL,TimeFrame,20,SlowMAshift,SlowMAType,SlowMAPrice,1);

}

else

{

FastMACurrent = iMA(NULL,TimeFrame,2,FastMAshift,FastMAType,FastMAPrice,0);

SlowMACurrent = iMA(NULL,TimeFrame,4,SlowMAshift,SlowMAType,SlowMAPrice,0);

FastMACurrent2 = iMA(NULL,TimeFrame,5,FastMAshift,FastMAType,FastMAPrice,0);

SlowMACurrent2 = iMA(NULL,TimeFrame,20,SlowMAshift,SlowMAType,SlowMAPrice,0);

}

CrossDirection = subCrossDirection(FastMACurrent,SlowMACurrent && FastMACurrent2,SlowMACurrent2);

File:
 

Cosa c'è che non va nel mio indicatore? Messaggio di errore

Ciao,

ecco il codice del mio indicatore:

#proprietà indicator_separate_window

#proprietà indicator_buffers 2

#proprietà indicator_color1 LightSeaGreen

#proprietà indicator_color2 Blu

extern string Timeframe_Momentum = "PERIOD_H1

extern int Periode_Momentum = 500;

extern int Periode_MA_Momentum = 8;

double Buffer_Mom[]

double Buffer_Ma[];

int init()

{

//---- indicatori

SetIndexStyle(0,DRAW_LINE);

SetIndexStyle(1,DRAW_LINE);

SetIndexBuffer(0,Buffer_Mom);

SetIndexBuffer(1,Buffer_Ma);

//----

SetIndexEmptyValue(0,0.0);

SetIndexEmptyValue(1,0.0);

SetIndexDrawBegin(0,100);

SetIndexDrawBegin(1,100);

//----

return(0);

}

int deinit()

{

//----

return(0);

}

void start()

{

int counted_bars=IndicatorCounted();

int limit=Bars contate_bars;

if(counted_bars>0) limit++;

//----

for(int i=0; i<limit; i++)

{

Buffer_Mom=iMomentum(NULL,Timeframe_Momentum,Periode_Momentum,PRICE_CLOSE,i);

Buffer_Ma=iMAOnArray(Buffer_Mom,0,Periode_MA_Momentum,0,MODE_SMA,i);

}

return(0);

}

Ecco il codice che uso nel programma principale:

double GMI1 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 0,1);

double GMI2 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 1,2);

Ora i miei problemi:

Ricevo questo messaggio di errore: EURUSD,M5: numero intero non valido come parametro 2 per la funzione di chiamata dell'indicatore

E non c'è nessun Buffer_Ma nel mio grafico! Cosa c'è di sbagliato nel mio codice?

 

Ciao

Come si calcola la deviazione standard tra l'Open e l'High della barra precedente?

Qualsiasi aiuto sarebbe fantastico.

Saluti

Beno

 

PERIOD_H1 è una macro intermedia provate a cambiare quella linea in

extern int TimeFrame_Momentum = PERIOD_H1;

o semplicemente sostituisci PERIOD_H1 con 60 e prova questo

sunshineh:
Ciao,

Ecco il codice del mio indicatore:

#proprietà indicator_separate_window

#proprietà indicator_buffers 2

#proprietà indicator_color1 LightSeaGreen

#proprietà indicator_color2 Blu

extern string Timeframe_Momentum = "PERIOD_H1

extern int Periode_Momentum = 500;

extern int Periode_MA_Momentum = 8;

double Buffer_Mom[]

double Buffer_Ma[];

int init()

{

//---- indicatori

SetIndexStyle(0,DRAW_LINE);

SetIndexStyle(1,DRAW_LINE);

SetIndexBuffer(0,Buffer_Mom);

SetIndexBuffer(1,Buffer_Ma);

//----

SetIndexEmptyValue(0,0.0);

SetIndexEmptyValue(1,0.0);

SetIndexDrawBegin(0,100);

SetIndexDrawBegin(1,100);

//----

return(0);

}

int deinit()

{

//----

return(0);

}

void start()

{

int counted_bars=IndicatorCounted();

int limit=Bars contate_bars;

if(counted_bars>0) limit++;

//----

for(int i=0; i<limit; i++)

{

Buffer_Mom=iMomentum(NULL,Timeframe_Momentum,Periode_Momentum,PRICE_CLOSE,i);

Buffer_Ma=iMAOnArray(Buffer_Mom,0,Periode_MA_Momentum,0,MODE_SMA,i);

}

return(0);

}

Ecco il codice che uso nel programma principale:

double GMI1 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 0,1);

double GMI2 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 1,2);

Ora i miei problemi:

Ricevo questo messaggio di errore: EURUSD,M5: numero intero non valido come parametro 2 per la funzione di chiamata dell'indicatore

E non c'è nessun Buffer_Ma nel mio grafico! Cosa c'è di sbagliato nel mio codice?
Motivazione: