![MQL5 - Langage des stratégies de trading intégré au terminal client MetaTrader 5](https://c.mql5.com/i/registerlandings/logo-2.png)
Vous manquez des opportunités de trading :
- Applications de trading gratuites
- Plus de 8 000 signaux à copier
- Actualités économiques pour explorer les marchés financiers
Inscription
Se connecter
Vous acceptez la politique du site Web et les conditions d'utilisation
Si vous n'avez pas de compte, veuillez vous inscrire
Bonjour ! Vous pouvez vous détacher de la version démo.
Désolé, je ne peux pas modifier le fichier ex4
Bonjour,
J'ai besoin d'aide pour faire fonctionner l'alerte. Elle fonctionne bien mais environ 35% du temps, elle n'émet pas de son lorsqu'il y a un signal. Quelqu'un peut-il y jeter un coup d'oeil et la réparer ?
Merci beaucoup.Bonjour Makototokyo,
Il s'agit de la version d'exécution compilée (.ex4) qui ne peut être modifiée.
Vous avez besoin du code source pour pouvoir modifier quoi que ce soit dans l'indicateur.
Essayez de trouver et de télécharger le code source .mq4... et quelqu'un pourra alors vous aider.
J'espère que cela vous aidera,
Robert
Messieurs
C'est possible ?
Respecte
DanQu'est-ce que M-Candle ? Ou MultiPair trend_v2.1 ?
Bonjour, une question à la volée...
Je suis en train d'écrire cet indicateur simple mais je ne sais pas encore comment utiliser l'instruction "if". Pouvez-vous me donner la réponse à cette question ? Merci
#property indicator_chart_window
extern string LBL1_FontType = "Tahoma"; //Font type label 1
extern color LBL1_FontColor = Black; //Font color label 1
extern int LBL1_FontSize = 18; //Font size label 1
extern string LBL2_FontType = "Arial"; //Font type label 2
extern color LBL2_FontColor = Green; //Font color label 2
extern int LBL2_FontSize = 12; //Font size label 2
extern string LBL3_FontType = "Tahoma"; //Font type label 3
extern color LBL3_FontColor = Black; //Font color label 3
extern int LBL3_FontSize = 10; //Font size label 3
extern string LBL4_FontType = "Tahoma"; //Font type label 3
extern color LBL4_FontColor = DarkViolet; //Font color label 3
extern int LBL4_FontSize = 8; //Font size label 3
extern string LBL5_FontType = "Tahoma"; //Font type label 4
extern color LBL5_FontColor = DarkViolet; //Font color label 4
extern int LBL5_FontSize = 8; //Font size label 4
extern string LBL6_FontType = "Tahoma"; //Font type label 5
extern color LBL6_FontColor = DarkViolet; //Font color label 5
extern int LBL6_FontSize = 8; //Font size label 5
extern int Corner = 1; //Position corner
extern int Xpos = 10; //X position label 1
extern int Ypos = 10; //Y position label 2
// Symbol_Name = "Symbol name"; //Text label 1
extern string Rb_Size = "rb2"; //Text label 2
extern int Contract_Size = 1; //Text label 3
extern double Tick_Value = 12.5; //Text label 4
extern double Margin = 2500; //Text label 5
extern double Commissions = 3.12; //Text label 6
extern string Currency = "€";
extern bool FullVersion = false; //enable / disable full labels list
//--------------------------------
int init()
{
return(0);
}
//--------------------------------
int deinit()
{
ObjectDelete("Label_1");
ObjectDelete("Label_2");
ObjectDelete("Label_3");
ObjectDelete("Label_4");
ObjectDelete("Label_5");
ObjectDelete("Label_6");
return(0);
}
//---------------------------------
int start()
{
ObjectCreate("Label_1", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Label_1", Symbol(), LBL1_FontSize, LBL1_FontType, LBL1_FontColor);
ObjectSet("Label_1", OBJPROP_CORNER, Corner);
ObjectSet("Label_1", OBJPROP_XDISTANCE, Xpos);
ObjectSet("Label_1", OBJPROP_YDISTANCE, Ypos);
ObjectCreate("Label_2", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Label_2", Rb_Size, LBL2_FontSize, LBL2_FontType, LBL2_FontColor);
ObjectSet("Label_2", OBJPROP_CORNER, Corner);
ObjectSet("Label_2", OBJPROP_XDISTANCE, Xpos);
ObjectSet("Label_2", OBJPROP_YDISTANCE, Ypos+30);
if (FullVersion = true)
{
ObjectCreate("Label_3", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Label_3", "CONTRACT SIZE: "+Contract_Size, LBL3_FontSize, LBL3_FontType, LBL3_FontColor);
ObjectSet("Label_3", OBJPROP_CORNER, Corner);
ObjectSet("Label_3", OBJPROP_XDISTANCE, Xpos);
ObjectSet("Label_3", OBJPROP_YDISTANCE, Ypos+80);
ObjectCreate("Label_4", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Label_4", "tick value: "+Tick_Value*Contract_Size+" "+Currency, LBL4_FontSize, LBL4_FontType, LBL4_FontColor);
ObjectSet("Label_4", OBJPROP_CORNER, Corner);
ObjectSet("Label_4", OBJPROP_XDISTANCE, Xpos);
ObjectSet("Label_4", OBJPROP_YDISTANCE, Ypos+100);
ObjectCreate("Label_5", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Label_5", "margin: "+Margin*Contract_Size+" "+Currency, LBL5_FontSize, LBL5_FontType, LBL5_FontColor);
ObjectSet("Label_5", OBJPROP_CORNER, Corner);
ObjectSet("Label_5", OBJPROP_XDISTANCE, Xpos);
ObjectSet("Label_5", OBJPROP_YDISTANCE, Ypos+112);
ObjectCreate("Label_6", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Label_6", "commissions: "+Commissions*Contract_Size+" "+Currency, LBL6_FontSize, LBL6_FontType, LBL6_FontColor);
ObjectSet("Label_6", OBJPROP_CORNER, Corner);
ObjectSet("Label_6", OBJPROP_XDISTANCE, Xpos);
ObjectSet("Label_6", OBJPROP_YDISTANCE, Ypos+124);
}
return(0);
}
//+------------------------------------------------------------------+Bonjour, une question à la volée...
Je suis en train d'écrire un indicateur simple mais je ne sais pas encore comment utiliser l'instruction "if". Pouvez-vous me donner la réponse à cette question ? Merci
#property indicator_chart_window
extern string LBL1_FontType = "Tahoma"; //Font type label 1
extern color LBL1_FontColor = Black; //Font color label 1
extern int LBL1_FontSize = 18; //Font size label 1
extern string LBL2_FontType = "Arial"; //Font type label 2
extern color LBL2_FontColor = Green; //Font color label 2
extern int LBL2_FontSize = 12; //Font size label 2
extern string LBL3_FontType = "Tahoma"; //Font type label 3
extern color LBL3_FontColor = Black; //Font color label 3
extern int LBL3_FontSize = 10; //Font size label 3
extern string LBL4_FontType = "Tahoma"; //Font type label 3
extern color LBL4_FontColor = DarkViolet; //Font color label 3
extern int LBL4_FontSize = 8; //Font size label 3
extern string LBL5_FontType = "Tahoma"; //Font type label 4
extern color LBL5_FontColor = DarkViolet; //Font color label 4
extern int LBL5_FontSize = 8; //Font size label 4
extern string LBL6_FontType = "Tahoma"; //Font type label 5
extern color LBL6_FontColor = DarkViolet; //Font color label 5
extern int LBL6_FontSize = 8; //Font size label 5
extern int Corner = 1; //Position corner
extern int Xpos = 10; //X position label 1
extern int Ypos = 10; //Y position label 2
// Symbol_Name = "Symbol name"; //Text label 1
extern string Rb_Size = "rb2"; //Text label 2
extern int Contract_Size = 1; //Text label 3
extern double Tick_Value = 12.5; //Text label 4
extern double Margin = 2500; //Text label 5
extern double Commissions = 3.12; //Text label 6
extern string Currency = "€";
extern bool FullVersion = false; //enable / disable full labels list
//--------------------------------
int init()
{
return(0);
}
//--------------------------------
int deinit()
{
ObjectDelete("Label_1");
ObjectDelete("Label_2");
ObjectDelete("Label_3");
ObjectDelete("Label_4");
ObjectDelete("Label_5");
ObjectDelete("Label_6");
return(0);
}
//---------------------------------
int start()
{
ObjectCreate("Label_1", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Label_1", Symbol(), LBL1_FontSize, LBL1_FontType, LBL1_FontColor);
ObjectSet("Label_1", OBJPROP_CORNER, Corner);
ObjectSet("Label_1", OBJPROP_XDISTANCE, Xpos);
ObjectSet("Label_1", OBJPROP_YDISTANCE, Ypos);
ObjectCreate("Label_2", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Label_2", Rb_Size, LBL2_FontSize, LBL2_FontType, LBL2_FontColor);
ObjectSet("Label_2", OBJPROP_CORNER, Corner);
ObjectSet("Label_2", OBJPROP_XDISTANCE, Xpos);
ObjectSet("Label_2", OBJPROP_YDISTANCE, Ypos+30);
if (FullVersion = true)
{
ObjectCreate("Label_3", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Label_3", "CONTRACT SIZE: "+Contract_Size, LBL3_FontSize, LBL3_FontType, LBL3_FontColor);
ObjectSet("Label_3", OBJPROP_CORNER, Corner);
ObjectSet("Label_3", OBJPROP_XDISTANCE, Xpos);
ObjectSet("Label_3", OBJPROP_YDISTANCE, Ypos+80);
ObjectCreate("Label_4", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Label_4", "tick value: "+Tick_Value*Contract_Size+" "+Currency, LBL4_FontSize, LBL4_FontType, LBL4_FontColor);
ObjectSet("Label_4", OBJPROP_CORNER, Corner);
ObjectSet("Label_4", OBJPROP_XDISTANCE, Xpos);
ObjectSet("Label_4", OBJPROP_YDISTANCE, Ypos+100);
ObjectCreate("Label_5", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Label_5", "margin: "+Margin*Contract_Size+" "+Currency, LBL5_FontSize, LBL5_FontType, LBL5_FontColor);
ObjectSet("Label_5", OBJPROP_CORNER, Corner);
ObjectSet("Label_5", OBJPROP_XDISTANCE, Xpos);
ObjectSet("Label_5", OBJPROP_YDISTANCE, Ypos+112);
ObjectCreate("Label_6", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Label_6", "commissions: "+Commissions*Contract_Size+" "+Currency, LBL6_FontSize, LBL6_FontType, LBL6_FontColor);
ObjectSet("Label_6", OBJPROP_CORNER, Corner);
ObjectSet("Label_6", OBJPROP_XDISTANCE, Xpos);
ObjectSet("Label_6", OBJPROP_YDISTANCE, Ypos+124);
}
return(0);
}
//+------------------------------------------------------------------+thefxpros
D'après ce que je vois, vous faites bien les choses.
L'indicateur affichera les étiquettes 3 à 6 seulement si FullVersion est défini à true.
Bonjour, une question à la volée... je suis en train d'écrire un indicateur simple mais je ne sais pas encore comment utiliser l'instruction "if". Pouvez-vous me donner la réponse à cette question ? Merci
Vous devez l'écrire soit de cette façon : if (FullVersion == true) ou de cette façon : if (FullVersion)![](https://c.mql5.com/forextsd/smiles/embaressed_smile.png)
Vous devez l'écrire soit de cette façon : if (FullVersion == true) ou de cette façon : if (FullVersion)
Ooooops![](https://c.mql5.com/forextsd/smiles/embaressed_smile.png)
Je n'ai pas remarqué le if (FullVersion = true).
thefxpros, airquest a raison : il faut mettre "==" et non "=" dans la condition if.
Pourquoi le maximum et le minimum ne sont pas fixés automatiquement ?intraday_intensityma.mq4
Pourquoi le maximum et le minimum ne sont pas fixés automatiquement ?intraday_intensityma.mq4
QuantF
Essayez-le maintenant : intraday_intensityma_1.mq4
Mais vérifiez aussi la ligne 55 : si la condition n'est pas la même que le diviseur.
QuantF
Essayez-le maintenant : intraday_intensityma_1.mq4
Mais vérifiez également la ligne 55 : si la condition n'est pas la même que le diviseur.Merci !