HighestLowest

0
(0)
نام:
Highest - Lowest
مصنف: lococo (2011.07.26 10:29)
ڈاؤن لوڈ کیا گیا۔: 4789
ڈاؤن لوڈ کریں:
Highest - Lowest 1
Highest-Lowest.mq4 (2.6 Kb) دیکھیں

تفصیل:

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 "n" bars; 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.

تصویر:

Highest - Lowest 2

 

 

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

//+------------------------------------------------------------------+
//|                                                    i-HighLow.mq4 |
//|                                          کاپی رائٹ © 2007, RickD |    
//|                                       Александър Пламенов Рядков |
//|                                            http://www.e2e-fx.net |
//+------------------------------------------------------------------+
#property copyright "© 2007 RickD"
#property link      "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();
//----
   اگر(counted < 0) 
       return (-1);
//----  
   اگر(counted > 0) 
       counted--;
   int limit = Bars - counted;
//----  
   کے لیے(int i = 0; میں < limit; i++) 
     {
       UpperBuf[میں] = iHigh(NULL, 0, iHighest(NULL, 0, MODE_HIGH, N, 
                           میں)) + N2*Point;
       LowerBuf[میں] = iLow(NULL, 0, iLowest(NULL, 0, MODE_LOW, N, میں)) - 
                          N2*Point;
     }
  }
//+------------------------------------------------------------------+

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

یہ پوسٹ کتنی مفید تھی۔?

اس کی درجہ بندی کرنے کے لیے ستارے پر کلک کریں۔!

اوسط درجہ بندی 0 / 5. ووٹوں کی گنتی: 0

ابھی تک کوئی ووٹ نہیں۔! اس پوسٹ کی درجہ بندی کرنے والے پہلے فرد بنیں۔.

ہمیں افسوس ہے کہ یہ پوسٹ آپ کے لیے مفید نہیں تھی۔!

آئیے اس پوسٹ کو بہتر بنائیں!

ہمیں بتائیں کہ ہم اس پوسٹ کو کیسے بہتر بنا سکتے ہیں۔?



مصنف: فاریکس وکی ٹیم
ہم انتہائی تجربہ کار فاریکس ٹریڈرز کی ایک ٹیم ہیں۔ [2000-2023] جو ہماری اپنی شرائط پر زندگی گزارنے کے لیے وقف ہیں۔. ہمارا بنیادی مقصد مالی آزادی اور آزادی حاصل کرنا ہے۔, اور ہم نے خود تعلیم حاصل کی ہے اور خود کو پائیدار طرز زندگی حاصل کرنے کے اپنے ذرائع کے طور پر فاریکس مارکیٹ میں وسیع تجربہ حاصل کیا ہے۔.