HighestLowest

0
(0)
Nombre:
Highest - Lowest
Autor: lococo (2011.07.26 10:29)
descargado: 4789
Descargar:
Highest - Lowest 1
Highest-Lowest.mq4 (2.6 Kb) Vista

Descripción:

After a while, searching the MQL4 community looking for an explanation on how to calculate the highest and lowest values for a data series over "norte" barras; I end up with this indicator that display exactly that.

There are various post explaining how to use iHighest and iLowest, i acknowledge all of them. This is just an application of it that suited my needs.

Feel free to use it and modify it.

Imagen:

Highest - Lowest 2

 

 

There is another indicator I think doing the same called i-HighLow

//+------------------------------------------------------------------+
//|                                                    i-HighLow.mq4 |
//|                                          Derechos de autor © 2007, RickD |    
//|                                       Александър Пламенов Рядков |
//|                                            http://www.e2e-fx.net |
//+------------------------------------------------------------------+
#derechos de autor de propiedad "© 2007 RickD"
#enlace de propiedad      "www.e2e-fx.net"
//----
#define major 1
#define minor 0
//----
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1  Gold
#property indicator_color2  DodgerBlue
//----
extern int N = 20;
extern int N2 = 5;
//----
double UpperBuf[];
double LowerBuf[];
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void init()
  {       
   SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 1);
   SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 1);
//----   
   SetIndexDrawBegin(0, N);
   SetIndexDrawBegin(1, N);
//----
   SetIndexBuffer(0, UpperBuf);
   SetIndexBuffer(1, LowerBuf);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void deinit() 
  {
//----
  }  
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void start() 
  {
   int counted = IndicatorCounted();
//----
   si(counted < 0) 
       devolver (-1);
//----  
   si(counted > 0) 
       counted--;
   int limit = Bars - counted;
//----  
   para(int i = 0; i < límite; i++) 
     {
       UpperBuf[i] = iHigh(NULO, 0, iHighest(NULO, 0, MODE_HIGH, N, 
                           i)) + N2*Point;
       LowerBuf[i] = iLow(NULO, 0, iLowest(NULO, 0, MODE_LOW, N, i)) - 
                          N2*Point;
     }
  }
//+------------------------------------------------------------------+

Choose for N2 "0" and you have the same. Ver http://codebase.mql4.com/1099

¿De cuánta utilidad te ha parecido este contenido?

¡Haz clic en una estrella para puntuarlo!

Promedio de puntuación 0 / 5. Recuento de votos: 0

Hasta ahora, ¡no hay votos!. Sé el primero en puntuar este contenido.

¡Siento que este contenido no te haya sido útil!

¡Déjame mejorar este contenido!

Diez centavos, ¿cómo puedo mejorar este contenido?



Autor: Equipo Wiki de Forex
Somos un equipo de comerciantes de Forex altamente experimentados [2000-2023] que se dedican a vivir la vida en nuestros propios términos. Nuestro principal objetivo es lograr la independencia financiera y la libertad., y hemos buscado la autoeducación y adquirido una amplia experiencia en el mercado Forex como nuestro medio para lograr un estilo de vida autosostenible..