Comment coder ? - page 209 1...202203204205206207208209210211212213214215216...347 Nouveau commentaire kessing 2009.10.11 06:39 #2081 Bonjour à tous... Quelqu'un peut-il me montrer comment commencer à coder des indicateurs et des EA ? InTrance 2009.10.11 09:04 #2082 kessing: Bonjour à tous... Quelqu'un peut-il me montrer comment commencer à coder des indicateurs et des EA ? Salut, Regardez ici : https://www.mql5.com/en/forum/172969/page2 Sergey Golubev 2009.10.11 09:31 #2083 kessing: Bonjour à tous... Quelqu'un peut-il me montrer comment commencer à coder des indicateurs et des EA ? Lire ce fil (premier message) : https://www.mql5.com/en/forum/178706 et ce fil de discussion : https://www.mql5.com/en/forum/173290 luxinterior 2009.10.11 21:14 #2084 kessing: Bonjour à tous... Quelqu'un peut-il me montrer comment commencer à coder des indicateurs et des EA ? Il y a beaucoup d'informations ici et sur FF. Tu peux aussi faire une recherche sur Google. Pour une introduction facile à la programmation EA , consultez le lien dans mon sig. C'est un bon point de départ pour un programmeur novice. Bonne chance ! Lux Fisher Demandez ! Le Magnifique Oncle Martin Chee Chua 2009.10.13 14:35 #2085 sparow21 2009.10.13 17:32 #2086 Indicateur vers EA Bonjour à tous, Je voudrais demander l'aide de quiconque peut faire l'EA de l'explosion de Waddah Attar ci-joint. Je suis impatient d'entendre la réponse. Merci. -s- Dossiers : waddah_attar_explosion.mq4 8 kb drhouse7 2009.10.14 13:56 #2087 ea universal Ma 2 cross Bonjour à tous ! Je cherche à modifier l'ea de firedave (de ce forum). L'ea s'appelle "universal ma cross ea". ce que je veux créer c'est une ea qui entre sur 2 cross confirmés (par exemple un couple d'ema 2 & 4 et un autre couple d'ema 5 & 20) Voici le code principal, que dois-je faire ? //----------------------- FIXE LA VALEUR DE LA VARIABLEif(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) ; j'ai tout essayé, mais je ne trouve pas de solution... aidez-moi s'il vous plaît pour la santé de cette communauté , je veux quelque chose de similaire à ceci : //----------------------- DÉFINIT LA VALEUR DE LA VARIABLEif(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) ; Dossiers : universalmacrossea.mq4 33 kb Croix ! Aide au codage Acheter/vendre des EA et sunshineh 2009.10.15 19:42 #2088 Qu'est-ce qui ne va pas avec mon indicateur ? Message d'erreur Bonjour, Voici le code de mon indicateur : #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 LightSeaGreen #property indicator_color2 Blue 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() { //---- indicateurs 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-counted_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) ; } Voici le code que j'utilise dans le programme principal : 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) ; Maintenant mes problèmes : J'obtiens ce message d'erreur : EURUSD,M5 : nombre entier invalide comme paramètre 2 pour la fonction d' appel de l'indicateur. ET il n'y a pas de Buffer_Ma dans mon graphique ! Qu'est-ce qui ne va pas avec mon code ? How to code? Whats wrong with my [ARCHIVE] Toute question de Beno 2009.10.15 19:43 #2089 Bonjour Comment calculer l'écart type entre l'ouverture et le haut de la barre précédente ? Toute aide serait la bienvenue. Salutations Beno cockeyedcowboy 2009.10.15 23:31 #2090 PERIOD_H1 est une macro interger, essayez de changer cette ligne en extern int TimeFrame_Momentum = PERIOD_H1 ; ou remplacez simplement PERIOD_H1 par 60 et essayez cela sunshineh: Bonjour,Voici le code de mon indicateur : #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 LightSeaGreen #property indicator_color2 Blue 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() { //---- indicateurs 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-counted_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) ; } Voici le code que j'utilise dans le programme principal : 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) ; Maintenant mes problèmes : J'obtiens ce message d'erreur : EURUSD,M5 : nombre entier invalide comme paramètre 2 pour la fonction d'appel de l'indicateur. ET il n'y a pas de Buffer_Ma dans mon graphique ! Qu'est-ce qui ne va pas dans mon code ? 1...202203204205206207208209210211212213214215216...347 Nouveau commentaire
Bonjour à tous...
Quelqu'un peut-il me montrer comment commencer à coder des indicateurs et des EA ?
Bonjour à tous... Quelqu'un peut-il me montrer comment commencer à coder des indicateurs et des EA ?
Salut,
Regardez ici : https://www.mql5.com/en/forum/172969/page2
Bonjour à tous... Quelqu'un peut-il me montrer comment commencer à coder des indicateurs et des EA ?
Lire ce fil (premier message) : https://www.mql5.com/en/forum/178706
et ce fil de discussion : https://www.mql5.com/en/forum/173290
Bonjour à tous... Quelqu'un peut-il me montrer comment commencer à coder des indicateurs et des EA ?
Il y a beaucoup d'informations ici et sur FF. Tu peux aussi faire une recherche sur Google.
Pour une introduction facile à la programmation EA , consultez le lien dans mon sig. C'est un bon point de départ pour un programmeur novice.
Bonne chance !
Lux
Indicateur vers EA
Bonjour à tous,
Je voudrais demander l'aide de quiconque peut faire l'EA de l'explosion de Waddah Attar ci-joint.
Je suis impatient d'entendre la réponse.
Merci.
-s-
ea universal Ma 2 cross
Bonjour à tous !
Je cherche à modifier l'ea de firedave (de ce forum).
L'ea s'appelle "universal ma cross ea".
ce que je veux créer c'est une ea qui entre sur 2 cross confirmés (par exemple un couple d'ema 2 & 4 et un autre couple d'ema 5 & 20)
Voici le code principal, que dois-je faire ?
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) ;j'ai tout essayé, mais je ne trouve pas de solution... aidez-moi s'il vous plaît pour la santé de cette communauté
, je veux quelque chose de similaire à ceci :
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) ;Qu'est-ce qui ne va pas avec mon indicateur ? Message d'erreur
Bonjour,
Voici le code de mon indicateur :
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 LightSeaGreen
#property indicator_color2 Blue
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()
{
//---- indicateurs
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-counted_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) ;
}
Voici le code que j'utilise dans le programme principal :
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) ;
Maintenant mes problèmes :
J'obtiens ce message d'erreur : EURUSD,M5 : nombre entier invalide comme paramètre 2 pour la fonction d' appel de l'indicateur.
ET il n'y a pas de Buffer_Ma dans mon graphique ! Qu'est-ce qui ne va pas avec mon code ?
Bonjour
Comment calculer l'écart type entre l'ouverture et le haut de la barre précédente ?
Toute aide serait la bienvenue.
Salutations
Beno
PERIOD_H1 est une macro interger, essayez de changer cette ligne en
extern int TimeFrame_Momentum = PERIOD_H1 ;
ou remplacez simplement PERIOD_H1 par 60 et essayez cela
Bonjour,
Voici le code de mon indicateur :
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 LightSeaGreen
#property indicator_color2 Blue
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()
{
//---- indicateurs
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-counted_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) ;
}
Voici le code que j'utilise dans le programme principal :
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) ;
Maintenant mes problèmes :
J'obtiens ce message d'erreur : EURUSD,M5 : nombre entier invalide comme paramètre 2 pour la fonction d'appel de l'indicateur.
ET il n'y a pas de Buffer_Ma dans mon graphique ! Qu'est-ce qui ne va pas dans mon code ?