Serait-il possible enfin de régler ce problème que tout le monde parle !!!! - page 2

 
Non j'ai dit trader professionnel et non programmeur. J'aimerais juste (comme j'ai précisé précédemment) Me faire un expert qui pourrait m'éviter de passer la journée devant mon écran. 
[Supprimé]  
D2xJrdn #Non j'ai dit trader professionnel et non programmeur. J'aimerais juste (comme j'ai précisé précédemment) Me faire un expert qui pourrait m'éviter de passer la journée devant mon écran. 

Si vous n'êtes pas programmeur, vous devrez montrer votre code si vous avez besoin d'aide. Nous ne pouvons pas vous aider si nous ne voyons pas ce que vous codez.

Si vous ne souhaitez pas le montrer, vous devrez faire vos propres recherches, en consultant les exemples dans la documentation et dans la base de code.

If you are not a programmer, then if you need help with your code you will need to show it. We can't help if we can't see what you are coding.

If you don't want to show it, then you will have to do some research on your own, looking at examples in the documentation and in the CodeBase.

 
Fernando Carreiro #:

Si vous n'êtes pas programmeur, vous devrez montrer votre code si vous avez besoin d'aide. Nous ne pouvons pas vous aider si nous ne voyons pas ce que vous codez.

Si vous ne souhaitez pas le montrer, vous devrez faire vos propres recherches, en consultant les exemples dans la documentation et dans la base de code.

If you are not a programmer, then if you need help with your code you will need to show it. We can't help if we can't see what you are coding.

If you don't want to show it, then you will have to do some research on your own, looking at examples in the documentation and in the CodeBase.

Je comprends tout à fait, je vous envoie le code.
//+-----------------------------------------------------------------------------------------------------------------------------------------------------+
//|                                                                                                                                       LANGUAGE: MQL5|
//+-----------------------------------------------------------------------------------------------------------------------------------------------------+
#include <Trade/Trade.mqh>
#include <Outils.mqh>
//+-----------------------------------------------------------------------------------------------------------------------------------------------------+
input group "LENTE";
input int LENT_MA_PERIOD = 200;
input int LENT_MA_SHIFT = 0;
input ENUM_MA_METHOD LENT_MA_METHOD = MODE_SMA;
input ENUM_APPLIED_PRICE LENT_MA_PRICE = PRICE_CLOSE;

input group "RAPIDE";
input int RAPIDE_MA_PERIOD = 50;
input int RAPIDE_MA_SHIFT = 0;
input ENUM_MA_METHOD RAPIDE_MA_METHOD = MODE_SMA;
input ENUM_APPLIED_PRICE RAPIDE_MA_PRICE = PRICE_CLOSE;
//+-----------------------------------------------------------------------------------------------------------------------------------------------------+
int Signal_ACHAT(string symbolName, ENUM_TIMEFRAMES timeframe)
{
   double Lente[];
   double Rapide[];

   ArraySetAsSeries(Lente, true);
   ArraySetAsSeries(Rapide, true);
  
   int Lente_Definition = iMA(symbolName, timeframe, LENT_MA_PERIOD, LENT_MA_SHIFT, LENT_MA_METHOD, LENT_MA_PRICE);
   int Rapide_Definition = iMA(symbolName, timeframe, LENT_MA_PERIOD, LENT_MA_SHIFT, LENT_MA_METHOD, LENT_MA_PRICE);

   if (CopyBuffer(Lente_Definition, 0, 1, 2, Lente) == 2
   &&  CopyBuffer(Rapide_Definition, 0, 1, 2, Rapide) == 2)
   
   { if (Rapide[1] < Moyenne[1] && Rapide[0] > Moyenne[0]) return 1; }
    
   return 0; 
 }
//+-----------------------------------------------------------------------------------------------------------------------------------------------------+
void OnTick()
{
   string Message_ACHAT = "SIGNAL D'ACHAT";
   int Notification_ACHAT = Signal_ACHAT(_Symbol, PERIOD_CURRENT);
   
   if(Notification_ACHAT)
      { if(!SendNotification(Message_ACHAT))
         { Print(Message_ACHAT); } }
 }
//+-----------------------------------------------------------------------------------------------------------------------------------------------------+
[Supprimé]  
D2xJrdn #Je comprends tout à fait, je vous envoie le code.

Je ne parviens pas à compiler votre code car vous n'avez pas fourni le fichier « Outils.mqh ». Vous avez également plusieurs autres problèmes de logique, mais je ne vais pas les aborder pour l'instant.

Plus important encore, vous n'avez apporté aucune des modifications que je vous ai fournies, mais vous avez déclaré que cela ne fonctionnait pas. Voici à nouveau mon exemple de code. Veuillez apporter les modifications nécessaires et corriger toutes vos autres erreurs si vous avez besoin d'aide supplémentaire.

I am unable to compile your code because you did not provide the "Outils.mqh" file. You also have several other logic issues, but I am not going to address those now.

Most importantly, you did not make any of the changes I provided, yet stated that it did not work. Here is my example code again, so please make the necessary changes and correct all your other errors if you need further help.

void OnTick() {
   string Message_ACHAT = "SIGNAL D'ACHAT";

   static int Signal_ACHAT_Actuel    = WRONG_VALUE;
          int Signal_ACHAT_Précédent = Signal_ACHAT_Actuel;
              Signal_ACHAT_Actuel    = Signal_ACHAT( _Symbol, _Period );
              
   if( Signal_ACHAT_Actuel != Signal_ACHAT_Précédent && Signal_ACHAT_Actuel > 0 ) {
      if( !SendNotification( Message_ACHAT ) ) {
         Print( Message_ACHAT );
      };
   };
};
 
Fernando Carreiro #:
void OnTick() {    string Message_ACHAT = "SIGNAL D'ACHAT";    static int Signal_ACHAT_Actuel    = WRONG_VALUE;           int Signal_ACHAT_Précédent = Signal_ACHAT_Actuel;               Signal_ACHAT_Actuel    = Signal_ACHAT( _Symbol, _Period );                   if( Signal_ACHAT_Actuel != Signal_ACHAT_Précédent && Signal_ACHAT_Actuel > 0 ) {       if( !SendNotification( Message_ACHAT ) ) {          Print( Message_ACHAT );
ENFINNNN !!!! Un grand Merci pour votre patience et votre aide précieuse.