Besoin d'une petite mise au point - page 9

 
Сергей Дыбленко:

Je ne m'en suis même pas soucié !!!!!!!!!!! ok..... Je me suis excusé et c'est à vous de pardonner ou pas !

Merci encore pour le conseil !!!!!!!!!!

et désolé de vous avoir fait perdre votre temps avec moi!!!!!!!!!!!

Sergei, je (désolé, connard) c'est bon. J'ai juste dit que j'avais bu quelques verres - (les gens deviennent maniaques quand ils boivent) Je suis désolé, connard. Je ne voulais pas t'offenser.

 
Alexsandr San:

Sergei, je suis (pardonne-moi, connard) c'est bon. J'ai écrit, j'ai bu quelques verres - (les gens ont la manie de boire) pardonne-moi, connard. Je ne voulais pas t'offenser.

Je l'ai eu ! ))))

Paix, Travail, Mai !

 
Сергей Дыбленко:

Copie ! ))))

paix, travail, mai !

Sergei, j'ai fait quelques ajustements ici. Cette fonction est destinée à la réflexion et doit être utilisée avec calme et prudence.

voici la dernière versionhttps://c.mql5.com/3/323/Grid_small_revision__3.mq4

Désolé pour hier - ivre comme un cochon.

 
Alexsandr San:

Sergei, j'ai fait quelques ajustements ici. Cette fonction est destinée à la réflexion et doit être utilisée avec calme et prudence.

voici la dernière versionhttps://c.mql5.com/3/323/Grid_small_revision__3.mq4

Désolé pour hier - ivre comme un cochon.

ok, ça ne fait rien)))
 

il y a environ six mois, j'ai trouvé un indicateur de niveau.......... mais je n'ai jamais réussi à le faire fonctionner correctement.

pourquoi ne pas y jeter un coup d'œil à votre guise ? .....

Les niveaux sont corrects mais les flèches sont fausses......... je n'ai pas pu l'ajuster pour qu'il fonctionne comme une horloge.


// Original indicator by KurlFX 23/6/09
//+------------------------------------------------------------------+
//|                                            Easy Trend Visualizer |
//|                                 Copyright © 2009-2017, EarnForex |
//|                                       https://www.earnforex.com/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009-2018, EarnForex"
#property link      "https://www.earnforex.com/metatrader-indicators/EasyTrendVisualizer/"
#property version   "1.09"

#property description "Easy Trend Visualizer - displays trend strength, direction, and support and resistance levels."
#property description "Alerts:"
#property description " * ERV-HL - Horizontal line"
#property description " * ERV-AU - Arrow up"
#property description " * ERV-AD - Arrow down"
#property description " * ERV-HLPC - Price crosses and closes above/below previous horizontal line."
#property strict

#define  Alvl 35.0
#define  Alvl2 30.0

#property indicator_chart_window
#property indicator_buffers 5
//#property indicator_color1 clrMagenta
//#property indicator_color2 clrDeepSkyBlue
#property indicator_width1 8
#property indicator_width2 8
#property indicator_color3 clrYellow
#property indicator_color4 clrYellow
#property indicator_color5 clrYellow
#property indicator_width3 2
#property indicator_width4 2

input int ADXperiod1 = 10;
input int ADXperiod2 = 14;
input int ADXperiod3 = 20;
input bool UseAlertHorizontalLine = false;
input bool UseAlertUpDownArrows = false;
input int NumberPHLtoTrack = 0; // How many previous horizontal lines to track for alert purposes?
input int IgnorePHLShorterThan = 2; // Ignore previous horizontal lines short than
input color PHLC_Arrow_Color = clrChocolate;
input bool SendEmails = false; // Send alerts via email?
input bool SendNotifications = false; // Send alerts via push notifications?

int MxP, MnP, MdP;

double was_alert_hl = EMPTY_VALUE; // Horizontal line
double was_alert_au = EMPTY_VALUE; // Arrow up
double was_alert_ad = EMPTY_VALUE; // Arrow down

double To[];
double Tc[];
double ADX1[];
double ADX2[];
double ADX3[];
double Up[];
double Dn[];
double Ex[];

double Last_Ex[]; // Buffer to hold previous "last line levels". Required for price/line alert because imaginary line cross also count.
datetime was_alert_phlc[]; // Price crosses and closes above/below previous horizontal line.

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{
        MxP = MathMax(MathMax(ADXperiod1, ADXperiod2), ADXperiod3);
        MnP = MathMin(MathMin(ADXperiod1, ADXperiod2), ADXperiod3);
        if (MxP == ADXperiod1) MdP = MathMax(ADXperiod2, ADXperiod3);
        else if (MxP == ADXperiod2) MdP = MathMax(ADXperiod1, ADXperiod3);      
        else MdP = MathMax(ADXperiod2, ADXperiod1);
        
        IndicatorShortName("ETV(" + IntegerToString(MnP) + "/" + IntegerToString(MdP) + "/" + IntegerToString(MxP) + ")");

        IndicatorBuffers(8);
        SetIndexBuffer(0, To);
        SetIndexBuffer(1, Tc);
        SetIndexBuffer(2, Up);
        SetIndexBuffer(3, Dn);
        SetIndexBuffer(4, Ex);
        SetIndexBuffer(5, ADX1);
        SetIndexBuffer(6, ADX2);
        SetIndexBuffer(7, ADX3);
        SetIndexLabel(0, NULL);
        SetIndexLabel(1, NULL);
        SetIndexStyle(0, DRAW_HISTOGRAM);
        SetIndexStyle(1, DRAW_HISTOGRAM);       
        SetIndexLabel(2, "Up");
        SetIndexLabel(3, "Dn");
        SetIndexLabel(4, "End");
        SetIndexStyle(2, DRAW_ARROW);
        SetIndexStyle(3, DRAW_ARROW);
        SetIndexStyle(4, DRAW_LINE);
        SetIndexArrow(2, 225);
        SetIndexArrow(3, 226);

   ArrayResize(Last_Ex, PHLC_Arrow_Color);
   ArrayInitialize(Last_Ex, EMPTY_VALUE);

   ArrayResize(was_alert_phlc, PHLC_Arrow_Color);
   ArrayInitialize(was_alert_phlc, 0);

        return(0);
}

//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
void deinit()
{
   // Delete all alert arrows.
   ObjectsDeleteAll(0, "PHLCArrow_", -1, OBJ_ARROW);
}

//+------------------------------------------------------------------+
//| Custom Easy Trend Visualization indicator                        |
//+------------------------------------------------------------------+
int start()
{
        int cntbar = IndicatorCounted();
        int limit = Bars - cntbar;
        if (cntbar == 0) limit -= MxP;
        // Need to update at least the most recent two values for use in the main cycle.
        for (int i = MathMax(limit - 1, 2); i >= 0; i--)
        {
      ADX1[i] = iADX(NULL, 0, MnP, PRICE_CLOSE, MODE_MAIN, i);
      ADX2[i] = iADX(NULL, 0, MdP, PRICE_CLOSE, MODE_MAIN, i);
      ADX3[i] = iADX(NULL, 0, MxP, PRICE_CLOSE, MODE_MAIN, i);
        }
        
        if (cntbar == 0) limit--;

        for (int i = limit - 1; i >= 0; i--)
        {
                bool f1 = false, f2 = false, f3 = false;
                To[i] = EMPTY_VALUE; Tc[i] = EMPTY_VALUE;
                Up[i] = EMPTY_VALUE; Dn[i] = EMPTY_VALUE; Ex[i] = EMPTY_VALUE;
                
                // Remember last lines for imaginary crosses.
                if ((NumberPHLtoTrack > 0) && (i + 2 < Bars)) // Check if we fit into arrays.
                {
                   // New line found and it has not yet been included.
                   if ((Ex[i + 1] == EMPTY_VALUE) && (Ex[i + 2] != EMPTY_VALUE) && (Last_Ex[0] != Ex[i + 2]))
                   {
                      // Count the length of the added line.
                      int length = 1;
                      for (int j = i + 3; j < Bars; j++)
                      {
                         if (Ex[j] == EMPTY_VALUE) break;
                         length++;
                      }

                      if (length >= IgnorePHLShorterThan)
                      // Shift arrays (FIFO, 0 - newest):
                      for (int j = NumberPHLtoTrack - 1; j >= 0; j--)
                      {
                      // This check is needed for a very special case of chart data not being fully loaded.
                      // When it is being loaded the indicator is recalculated, but new bars appear from left, not from right as usually.
                      // This keeps rewriting the Last_Ex array with basically the same values, which can lead to lots of unnecessary alerts.
                         if (Time[i + 2] < was_alert_phlc[j]) break;
                         if (j == 0) // Insert new value.
                         {
                            Last_Ex[j] = Ex[i + 2]; 
                            was_alert_phlc[j] = 0;
                         }
                         else // Shift.
                         {
                            Last_Ex[j] = Last_Ex[j - 1];
                            was_alert_phlc[j] = was_alert_phlc[j - 1];
                         }
                      }
                   }
                }

                if (ADX1[i + 1] < ADX1[i]) f1 = true;
                if (ADX2[i + 1] < ADX2[i]) f2 = true;
                if (ADX3[i + 1] < ADX3[i]) f3 = true;
                
                if ((f1) && (f2) && (f3) && (ADX1[i] > Alvl) && (ADX2[i] > Alvl2))
                {
                        double di = iADX(NULL, 0, MnP, PRICE_CLOSE, MODE_PLUSDI,  i)
                                                  -iADX(NULL, 0, MnP, PRICE_CLOSE, MODE_MINUSDI, i);
                        double hi = MathMax(Open[i], Close[i]);
                        double lo = MathMin(Open[i], Close[i]);
                        double op = Open[i];
                        if (di > 0)
                        {
                                To[i] = lo; Tc[i] = hi;
                                if (To[i + 1] == EMPTY_VALUE) Up[i] = op;
                        }
                        else
                        {
                                To[i] = hi; Tc[i] = lo;
                                if (To[i + 1] == EMPTY_VALUE) Dn[i] = op;
                        }
                }
                else
                {
                        if (To[i + 1] != EMPTY_VALUE) Ex[i] = Close[i + 1];
                        else Ex[i] = Ex[i + 1];
                }
        }

   string DateTime = IntegerToString(TimeYear(Time[0])) + "-" + FormatDateTimeDigit(TimeMonth(Time[0])) + "-" + FormatDateTimeDigit(TimeDay(Time[0])) + " " + FormatDateTimeDigit(TimeHour(Time[0])) + ":" + FormatDateTimeDigit(TimeMinute(Time[0]));
   string PerStr = PeriodToString(Period());
   if (UseAlertHorizontalLine)
   {
      if ((Ex[1] != EMPTY_VALUE) && (Ex[1] != was_alert_hl) && (Ex[1] != Ex[2]))
      {
         string text = "ETV-HL " + DateTime;
         Alert(text);
         text += " " + Symbol() + " @ " + PerStr;
         if (SendEmails) SendMail(text, text);
         if (SendNotifications) SendNotification(text);
         was_alert_hl = Ex[1];
      }
   }
   if (UseAlertUpDownArrows)
   {
      if ((Up[0] != EMPTY_VALUE) && (Up[0] != was_alert_au))
      {
         string text = "ETV-AU " + DateTime;
         Alert(text);
         text += " " + Symbol() + " @ " + PerStr;
         if (SendEmails) SendMail(text, text);
         if (SendNotifications) SendNotification(text);
         was_alert_au = Up[0];
      }
      if ((Dn[0] != EMPTY_VALUE) && (Dn[0] != was_alert_ad))
      {
         string text = "ETV-AD " + DateTime;
         Alert(text);
         text += " " + Symbol() + " @ " + PerStr;
         if (SendEmails) SendMail(text, text);
         if (SendNotifications) SendNotification(text);
         was_alert_ad = Dn[0];
      }
   }
   // Alerts for the previous HL crosses.
   if (NumberPHLtoTrack > 0)
   {
      DateTime = TimeToString(Time[1]);
      CheckImaginaryLinesCrosses(DateTime, PerStr);
   }
   
        return(0);
}

string FormatDateTimeDigit(int Input)
{
   if (Input < 10) return("0" + IntegerToString(Input));
   else return(IntegerToString(Input));
}

string PeriodToString(int per)
{
   switch (per)
   {
      case 60:
         return("H1");
      case 240:
         return("H4");
      case 1440:
         return("D1");
      case 10080:
         return("W1");
      case 43200:
         return("MN1");
      case 30:
         return("M30");
      case 15:
         return("M15");
      case 5:
         return("M5");
      case 1:
         return("M1");
   }
   return("");
}

void CheckImaginaryLinesCrosses(string DateTime, string PerStr)
{
   for (int i = 0; i < NumberPHLtoTrack; i++)
   {
      if ((Last_Ex[i] != EMPTY_VALUE) && (was_alert_phlc[i] != Time[0]) && (((Close[1] > Last_Ex[i]) && (Open[1] <= Last_Ex[i])) || ((Close[1] <= Last_Ex[i]) && (Open[1] > Last_Ex[i]))))
      {
         string text = "ETV-PHLC " + DateTime;
         Alert(text);
         string obj_name = "PHLCArrow_" + DateTime + IntegerToString(i);
         ObjectCreate(0, obj_name, OBJ_ARROW, 0, Time[1], Last_Ex[i]);
         ObjectSetInteger(0, obj_name, OBJPROP_ARROWCODE, 200); 
         ObjectSetInteger(0, obj_name, OBJPROP_COLOR, PHLC_Arrow_Color);
         string desc = "Price crossed: " + DoubleToString(Last_Ex[i], Digits()) + " @ " + PerStr;
         ObjectSetString(0, obj_name, OBJPROP_TOOLTIP, desc);
         ObjectSetString(0, obj_name, OBJPROP_TEXT, desc);
         ObjectSetInteger(0, obj_name, OBJPROP_SELECTABLE, false);
         ObjectSetInteger(0, obj_name, OBJPROP_HIDDEN, false);
         text += " " + Symbol() + " @ " + PerStr;
         if (SendEmails) SendMail(text, text);
         if (SendNotifications) SendNotification(text);
         was_alert_phlc[i] = Time[0];
      }
   }
}
//+------------------------------------------------------------------+
 
Сергей Дыбленко:

il y a environ six mois, j'ai trouvé un indicateur de niveau.......... mais je n'ai jamais réussi à le faire fonctionner correctement.

pourquoi ne pas y jeter un coup d'œil à votre guise ? .....

Les niveaux sont corrects mais les flèches sont fausses......... je n'ai pas pu l'ajuster pour qu'il fonctionne comme une horloge.


sur cet indicateur ?https://www.mql5.com/ru/code/13182

USDCHFM30

Easy Trend Visualizer
Easy Trend Visualizer
  • www.mql5.com
Easy Trend Visualizer — простой визуализатор трендов. Этот индикатор делает именно то, на что указывает его название. Он показывает, где начинается и кончается тренд и где тренд отсутствует вовсе. Индикатор основан на стандартных индикаторах ADX (Average Direction Movement Index) и работает довольно быстро. Easy Trend Visualizer отображается в...
Dossiers :
TADX.mq4  8 kb
 
Je pense que c'est.......... Je ne me souviens pas du lien ou du nom....... mais ça y ressemble.
 
Сергей Дыбленко:
Je pense que c'est.......... Je ne me souviens pas du lien ou du nom....... mais ça y ressemble.

il semble montrer - comme il est censé montrer ici un peu corrigé les avertissements

USDCHFM5

Les dossiers:
 
Je crois savoir qu'il a obtenu les sources ici https://www.mql5.com/ru/code/10304
 
J'essaie de faire coïncider les flèches avec les lignes de la voie, du moins approximativement, mais ça ne marche pas !
Raison: